mi18n
Add multi-lingual support to any JavaScript app or module with this light-weight package.
Features:
- Isomorphic/Universal
- easy translation of static text files
- benefits: anyone can translate, no more xliff
- reduced margin of error.
- Variable support
- Dependency free
- Fast
Usage
const i18nOptions = extension: '.lang' // extnsion used by your language files, defaults to ".lang" location: 'https://location.of/language/files/' // absolute or relative url to language files langs: // locales you would like to be active 'en-US' 'pt-BR' 'de-DE' // will attempt to load `https://location.of/language/files/de-DE.lang` with current config locale: 'en-US' // default locale override: 'en-US': autocomplete: 'Autofinish' // override individual keys or provide entire language definition const i18n = i18nOptions
... later
<label>i18n</label>
.lang
file
Example de-DE = Deutschen-US = German addOption = Option hinzufügenallFieldsRemoved = Alle Felder wurden entfernt.allowMultipleFiles = Upload mehrerer Dateien erlaubenautocomplete = Autovervollständigung