Localization API
Last modified by Marius Dumitru Florea on 2022/02/23 09:33
We added two methods to the LocalizationManager:
- a helper method to search for a given translation key in the specified locale and to render it as plain text:
String getTranslationPlain(String key, Locale locale, Object... parameters) - a method to get the configured default locale:
Locale getDefaultLocale()
The first one was already available in the script service (under a different name: $services.localization.render()), so we exposed the second one too:
$services.localization.defaultLocaleCheckout the Localization Module documentation for more information.