Class Locale
- java.lang.Object
-
public class Locale extends java.util.HashMap<Lang,Message>
Represents loaded language information.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static Locale
forLangCode(LangCode code, PlanFiles files)
static Locale
forLangCodeString(PlanFiles files, java.lang.String code)
static Locale
fromFile(java.io.File file)
Message
get(java.lang.Object key)
java.lang.String[]
getArray(Lang key)
java.lang.String[]
getArray(Lang key, java.io.Serializable... values)
LangCode
getLangCode()
java.util.Optional<Message>
getNonDefault(java.lang.Object key)
java.lang.String
getString(Lang key)
java.lang.String
getString(Lang key, java.io.Serializable... values)
static java.lang.String
getStringNullSafe(Locale locale, Lang lang)
int
hashCode()
void
loadFromAnotherLocale(Locale locale)
java.lang.String
replaceLanguageInHtml(java.lang.String from)
java.lang.String
replaceLanguageInJavascript(java.lang.String from)
-
-
-
Constructor Detail
-
Locale
public Locale()
-
Locale
public Locale(LangCode langCode)
-
-
Method Detail
-
forLangCodeString
public static Locale forLangCodeString(PlanFiles files, java.lang.String code) throws java.io.IOException
- Throws:
java.io.IOException
-
forLangCode
public static Locale forLangCode(LangCode code, PlanFiles files) throws java.io.IOException
- Throws:
java.io.IOException
-
fromFile
public static Locale fromFile(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
getLangCode
public LangCode getLangCode()
-
get
public Message get(java.lang.Object key)
-
getNonDefault
public java.util.Optional<Message> getNonDefault(java.lang.Object key)
-
getString
public java.lang.String getString(Lang key)
-
getString
public java.lang.String getString(Lang key, java.io.Serializable... values)
-
getArray
public java.lang.String[] getArray(Lang key)
-
getArray
public java.lang.String[] getArray(Lang key, java.io.Serializable... values)
-
loadFromAnotherLocale
public void loadFromAnotherLocale(Locale locale)
-
replaceLanguageInHtml
public java.lang.String replaceLanguageInHtml(java.lang.String from)
-
replaceLanguageInJavascript
public java.lang.String replaceLanguageInJavascript(java.lang.String from)
-
equals
public boolean equals(java.lang.Object o)
-
-