public interface I18nManager
Modifier and Type | Method and Description |
---|---|
void |
addResourceFamily(java.lang.String family,
java.lang.ClassLoader loader,
java.lang.String callerName) |
void |
addResourceFamily(java.lang.String family,
java.io.File folder)
Adds an additional family of resource files containing some translations.
|
java.util.Locale |
getCurrentLocale() |
java.util.List<java.util.Locale> |
getPreferredLocales() |
java.lang.String |
getTranslation(java.lang.String message)
Get translation for the current language of message.
|
java.lang.String |
getTranslation(java.lang.String message,
java.lang.String[] args)
Get translation for the current language of message.
|
java.lang.String getTranslation(java.lang.String message)
message
- the message key used for translation.java.lang.String getTranslation(java.lang.String message, java.lang.String[] args)
message
- the message key used for translation.args
- void addResourceFamily(java.lang.String family, java.lang.ClassLoader loader, java.lang.String callerName)
void addResourceFamily(java.lang.String family, java.io.File folder)
i18nManager.addResourceFamily("text", new File("./resources"))
family
- The family name (or base name) which is used to search
actual properties files.folder
- The search path to locate the property filesjava.util.List<java.util.Locale> getPreferredLocales()
java.util.Locale getCurrentLocale()