public final class Translations extends Object
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
static Locale |
DEFAULT_LOCALE
The default Locale, it the user has not chosen anything else.
|
static String |
DEFAULT_TRANSLATION
The default translation, if the user has not chosen anything else.
|
private static Translations |
instance |
private static org.slf4j.Logger |
log
The log stream
|
private static Locale |
originalLocale
The locale that the program starts with.
|
private String |
translation
The translation that BibleDesktop should use.
|
private static String |
TRANSLATION_KEY
The key used in config.xml
|
private String[] |
translations
List of available translations.
|
Modifier | Constructor and Description |
---|---|
private |
Translations()
Singleton classes have private constructors.
|
Modifier and Type | Method and Description |
---|---|
String |
getCurrent()
Get the current translation as a human readable string.
|
Locale |
getCurrentLocale()
Get the locale for the current translation.
|
static String |
getCurrentTranslation()
Get the current translation as a human readable string.
|
PropertyMap |
getSupported()
Gets a listing of all the translations that Bible Desktop supports.
|
static Map<String,String> |
getSupportedTranslations()
Gets a listing of all the translations that Bible Desktop supports.
|
static Translations |
instance()
All access to Translations is through this single instance.
|
private void |
loadSupportedTranslations()
Get a list of the supported translations
|
void |
register()
Register this class with the common config engine.
|
void |
setCurrent(String newTranslation)
Set the current translation, using human readable string.
|
static void |
setCurrentTranslation(String newTranslation)
Set the current translation, using human readable string.
|
void |
setLocale()
Set the locale for the program to the one the user has selected.
|
String |
toString(String translationCode) |
private static final String TRANSLATION_KEY
public static final String DEFAULT_TRANSLATION
public static final Locale DEFAULT_LOCALE
private String translation
private String[] translations
private static Locale originalLocale
private static Translations instance
private static final org.slf4j.Logger log
public static Translations instance()
public PropertyMap getSupported()
public Locale getCurrentLocale()
public String getCurrent()
public void setCurrent(String newTranslation)
newTranslation
- the translation to usepublic void setLocale()
public void register()
public static String getCurrentTranslation()
public static void setCurrentTranslation(String newTranslation)
newTranslation
- the translation to usepublic static Map<String,String> getSupportedTranslations()
private void loadSupportedTranslations()