Config Options
reRenderOnLangChange
reRenderOnLangChangeFor applications that don't allow users to change the language dynamically (e.g., via a dropdown), set this to false. This will save memory by rendering the view once and unsubscribing from the language change event. (Defaults to false.)
translocoConfig({
reRenderOnLangChange: boolean,
});defaultLang
defaultLangSets the default language for the application. (Defaults to 'en'.)
translocoConfig({
defaultLang: 'en',
});fallbackLang
fallbackLangDefines one or more fallback languages to use when a translation is unavailable. See the TranslocoFallbackStrategy section for customization options.
failedRetries
failedRetriesSpecifies the number of retries for loading translation files in case of failure. (Defaults to 2.)
prodMode
prodModeIndicates whether the application is running in production mode. (Defaults to false.) When enabled, Transloco will disable all console warnings.
availableLangs
availableLangsLists the available languages in your application.
missingHandler.allowEmpty
missingHandler.allowEmptySpecifies whether to allow empty values when a translation is missing. (Defaults to false.)
missingHandler.useFallbackTranslation
missingHandler.useFallbackTranslationDetermines whether to use the fallback language for missing keys or values. (Defaults to false.)
missingHandler.logMissingKey
missingHandler.logMissingKeySpecifies whether to log a warning to the console when a translation key is missing. (Defaults to true.)
flatten.aot
flatten.aotCheck the optimization plugin for Ahead-of-Time (AOT) compilation.
interpolation
interpolationDefines the start and end markers for parameters in translations. (Defaults to ['{{', '}}'].)
scopes.keepCasing
scopes.keepCasing Ensures that the casing of the scope name is preserved unless an alias has been set. If no alias is set, this option will be ignored.
This version aims to clarify the purpose of each option and maintain a consistent style for code examples.
Last updated
Was this helpful?

