This package offers translations for accounts-base, accounts-passwords, accounts-entry, accounts-templates-core and billing. Contributions for other packages are welcome. We try to translate only messages that might pop up at a users screen as developers are expected to understand English errors anyway.
Translations are currently available for Arabic, Czech, French, German, Hebrew, Italian, Polish, Portuguese, Russian, Slovenian, Spanish, Swedish and Vietnamese.
T9n.language = "es"
T9n.defaultLanguage = "en"
T9n.get(code)
Examples:
T9n.get('name');
T9n.get('store.purchase');
T9n.get('error.accounts.User not found');
{{t9n code}}
Example: {{t9n "store.purchase"}}
.
If a translation is not found the key is displayed. To spot not translated keys a prefix and a postfix can surround the key, they default to ">" and "<" so a you would see ">nonExistantKey<". You can change the pre- and postfix:
T9n.missingPrefix = ">"
T9n.missingPostfix = "<"
T9n.map language, yourMap
Example:
T9n.map 'en',
hello: 'world'
store:
purchase: 'buy now'
basket: 'basket'
Tip: If you do not want to expose the reason why a login was unsuccessful for security reasons. They could overwrite the corresponding messages:
T9n.map 'en',
error:
accounts:
'User not found': 'Not for you'
'Incorrect password': 'Not for you'
- djhi - French Translation
- mdede - Czech Translation
- robhunt3r - Improved Spanish Translation
- splendido - Italian Translation, Reactivity, Ideas
- pwldp - Polish Translation
- ryw - Fix for Blaze
- eahefnawy - Arabic Translation
- alanmeira - Portuguese Translation
- timtch - Russian Translation
- alesvaupotic - Slovenian Translation
- timbrandin - Swedish Translation
- olragon - Vietnamese Translation
- noamyoungerm - Hebrew Translation
This package is inspired by subhog's just-i18n and included this as a dependency before version 0.0.3.
MIT