public class DummyI18nManager extends java.lang.Object implements I18nManager
I18nManager implementation to be used when there has not been
registered an implementation.
Returns as value the same message to get the translation for.| Constructor and Description |
|---|
DummyI18nManager() |
| 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.
|
public java.lang.String getTranslation(java.lang.String message)
I18nManagergetTranslation in interface I18nManagermessage - the message key used for translation.public java.lang.String getTranslation(java.lang.String message,
java.lang.String[] args)
I18nManagergetTranslation in interface I18nManagermessage - the message key used for translation.public void addResourceFamily(java.lang.String family,
java.lang.ClassLoader loader,
java.lang.String callerName)
addResourceFamily in interface I18nManagerpublic void addResourceFamily(java.lang.String family,
java.io.File folder)
I18nManageri18nManager.addResourceFamily("text", new File("./resources"))addResourceFamily in interface I18nManagerfamily - The family name (or base name) which is used to search
actual properties files.folder - The search path to locate the property filespublic java.util.List<java.util.Locale> getPreferredLocales()
getPreferredLocales in interface I18nManagerpublic java.util.Locale getCurrentLocale()
getCurrentLocale in interface I18nManager