@openng/optimus-ui-locale
v2.0.2
Published
i18n and l7n locales for Optimus UI components
Downloads
17,522
Readme
Optimus UI Locale
i18n and l7n locales for the components of Optimus UI, vendored from the community supported PrimeLocale repository.
Installation
npm install @openng/optimus-ui-localeUsage
Import a locale from its subpath and pass it to the Optimus UI configuration:
import { de } from '@openng/optimus-ui-locale/js/de.js';
provideOptimus({
translation: de
});Or import the aggregate all export, which contains every locale keyed by language code (e.g. all.de):
import { all } from '@openng/optimus-ui-locale';
provideOptimus({
translation: all.de
});Or import the raw JSON for a single locale — note that each JSON file wraps its messages under the language-code key, so the messages are at de.de, not de:
import de from '@openng/optimus-ui-locale/de.json';
provideOptimus({
translation: de.de
});The package ships ESM modules (js/), CommonJS modules (cjs/), and the raw *.json files.
Contributing
Translations are maintained upstream in the PrimeLocale repository — please contribute new languages and fixes there.
