Represents the settings of the translation module.
interface TranslationConfig {
translationPath: string;
translationFormat?: string;
loaderType?: LoaderType;
sections: Array< string | Section | SectionGroup >;
defaultLanguage: string;
allowedLanguages?: Array< string >;
disableWarnings?: boolean;
currencyDefaultOptions?: object;
}
The property defines the URL where NgTranslation will download the translation files from. The property value is a template string that has to contain 2 named parameters surrounded by curly brackets:
Defines the format of the translation files. The default value is JSON.
This
parameter is used for custom translation converters.
Defines the type of the loader used to download the translation files. The
possible values are 'json'
, 'text'
, 'blob'
and 'arraybuffer'
, the default
value is 'json'
, This parameter is also used for custom converters.
Defines the collection of translation files. When a simple string is used, it is the name of a translation file without the file extension.
The code of the default language.
An optional list of language codes. WHen the list is supplied, only the languages listed will be used, including the default language.
If true, warning messages are not written to the console in production mode. The default value is false.
Provides default style options for currencies. The property names are the currency codes, and the values are strings containing the options set by default. The options are defined in the same way as currency formatting in localization.