Interface I18NextService
- All Known Implementing Classes:
DefaultI18NextService
public interface I18NextService
Service loads, merges and transforms translations in format of i18Next.
Service loads translations from app nad from plugins and merges translations under the same namespace. Namespace is read from resource filename, for example resource `messages_common.json` will be treated as translations under namespace common. If any two plugins define the same name of resource, then service attempt merging, this is when order of translations matter. Please be aware that it is possible to override translations from any plugin or from app.
Service supports also transformers, so it technically possible to fix some problems or even change form of translations on the fly. Consult active implementation for more info about transformers and merging.
-
Method Summary
Modifier and TypeMethodDescriptiongetI18NextResource
(Locale locale, String namespace) long
getResourceBundle
(String baseName, Locale locale, ClassLoader loader, boolean reload) void
setDefaultEncoding
(String defaultEncoding) void
setParentDirectory
(String parentDirectory)
-
Method Details
-
setParentDirectory
-
getDefaultEncoding
-
setDefaultEncoding
-
getLastUpdate
long getLastUpdate() -
getResourceBundle
I18NextNamespacedResourceBundle getResourceBundle(String baseName, Locale locale, ClassLoader loader, boolean reload) throws IOException - Throws:
IOException
-
getI18NextResource
- Throws:
IOException
-