Internationalization (i18n) system
Documenting how we handle translations in the code
Good practices
Use "select" when a value has a limited number of options
<FormattedMessage
defaultMessage="{action, select, delete {Delete this} archive {Archive this} other {Do something with this}}"
values={{ action: 'delete' }}
/>
// => "Delete this"
<FormattedMessage
defaultMessage="{action, select, delete {Delete this} archive {Archive this} other {Do something with this}}"
values={{ action: 'eat' }}
/>
// => "Do something with this"Don't assume word's order stays the same in other languages
Don't split strings
Use I18nFormatters to format rich text (bold, italic...etc)
Provide an ID when the translation depends on the context
Translate links inline
FormattedMessage
Add a new language
Add the language on Crowdin
Activate the language in the code
Last updated
Was this helpful?