包详细信息

@o3r/localization

AmadeusITGroup37.3kBSD-3-Clause12.4.0

This module provides a runtime dynamic language/translation support and debug tools.

localization, otter, otter-module, otter-cms

自述文件

Otter localization

Super cute Otter!

This package is an Otter Framework Module.

Description

Stable Version Bundle Size

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)

How to install

ng add @o3r/localization

[!WARNING] This module requires @o3r/core to be installed.

Generators

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

More details

Find more information in the documentation.