@bdspark/sparkng-locale
v22.0.6
Published
i18n and l7n locales for SparkNG components for Angular v22
Maintainers
Readme
SparkNG Locale
i18n and l7n locales for the components of SparkNG, vendored from the community supported PrimeLocale repository.
Installation
npm install @bdspark/sparkng-localeUsage
Import a locale from its subpath and pass it to the SparkNG configuration:
import { de } from '@bdspark/sparkng-locale/js/de.js';
provideSpark({
translation: de
});Or import the aggregate all export, which contains every locale keyed by language code (e.g. all.de):
import { all } from '@bdspark/sparkng-locale';
provideSpark({
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 '@bdspark/sparkng-locale/de.json';
provideSpark({
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.
