This package is an Otter Framework Module.
The localization module is built on top of an open source ngx-translate library. It provides the following features:
- Multiple locales support, switchable at runtime.
- RTL (right-to-left) text direction support
- Translations loader using a specific endpoint or defaulting to local translation bundles
- Fallback language and intelligent fallback support
- Translation of resource keys from templates (
*.html
) and from typescript (*.ts
) - Support for resource keys with parameters
- Custom
LocalizationConfiguration
- Ability to toggle translations on and off for debugging (and additional debug tools)
ng add @o3r/localization
[!WARNING] This module requires @o3r/core to be installed.
Otter framework provides a set of code generators based on Angular schematics.
Schematics | Description | How to use |
---|---|---|
add | Include Otter localization module in a library/application. | ng add @o3r/localization |
localization-to-component | Add localization architecture to an Otter component | ng g localization-to-component |
localization-key-to-component | Add a localization key to an Otter component | ng g localization-key-to-component |
Find more information in the documentation.