- [Internationalization](#internationalization) - [Translatable strings](#translatable-strings) - [Message definitions](#message-definitions) - [Render messages](#render-messages) - [ICU message format](#icu-message-format) - [Write strings for translation](#write-strings-for-translation) - [Rich-text messages](#rich-text-messages) - [Vue and ICU delimiter conflicts](#vue-and-icu-delimiter-conflicts) - [Imports](#imports) - [Reference examples](#reference-examples) # Internationalization Use the `@modrinth/ui` localization system for all user-visible strings in Vue single-file components (SFCs). Do not put hard-coded English text in templates or scripts. Get all user-visible text from `formatMessage` or ``. ## Translatable Strings Translate these user-visible items: - Inner text. - `alt` and `placeholder` attributes. - Button and dropdown-option labels. - Notification and error messages. Do not translate dynamic expressions, HTML tag names, CSS classes, internal identifiers, or log messages. In `{{ user.name }}`, only the static text around the expression needs translation. ## Message Definitions Use `defineMessage` or `defineMessages` from `@modrinth/ui` in `