|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectskrueger.i8n.I8NUtil
public class I8NUtil
Constructor Summary | |
---|---|
I8NUtil()
|
Method Summary | |
---|---|
static Translation |
createFromOneLIne(String oneLineCoded)
Creates a Translation If oneLineCoded is empty or null, NO TRANSLATION is set. |
static Set<String> |
getLanguageCodes()
|
static Locale |
getLocaleFor(String code)
|
static boolean |
isEmpty(String transString)
A convenience method that checks if the String returned by from a
Translation object contains a "valid" translation for the active
language. |
static boolean |
isEmpty(Translation trans)
A convenience method that checks if the Translation object
contains a translation for the active language. |
static boolean |
isValidISOLangCode(String code)
|
static double |
qmTranslation(List<String> languages,
Translation trans)
|
static String |
toOneLine(Translation source)
Returns the Translation to a String of the Format: "de{Baum}en{tree}" |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public I8NUtil()
Method Detail |
---|
public static Translation createFromOneLIne(String oneLineCoded)
Translation
oneLineCoded
is empty or null, NO TRANSLATION is set.
String
is interpreted as
the translation in the
language
public static String toOneLine(Translation source)
public static boolean isValidISOLangCode(String code)
code
-
public static Set<String> getLanguageCodes()
public static Locale getLocaleFor(String code)
code
- A two-letter language code.
null
or one (of many possible) Locale
that
uses this language.public static boolean isEmpty(Translation trans)
Translation
object
contains a translation for the active language. A String
containing only spaces will return false
.
trans
- Translation
to check.public static boolean isEmpty(String transString)
String
returned by from a
Translation
object contains a "valid" translation for the active
language. A String
containing only spaces or equals
Translation
.NO_TRANSLATION will return false
.
transString
- String
to check.public static double qmTranslation(List<String> languages, Translation trans)
ac
- AtlasConfig
to determine the languages to expect.trans
- The Translation
to check.
Double
between 0 and 1 representing the part of the
given Translation
that has been filled.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |