public class TranslationMap extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TranslationMap.TranslationHashMap |
Constructor and Description |
---|
TranslationMap() |
Modifier and Type | Method and Description |
---|---|
void |
add(Translation tr) |
static int |
countOccurence(String phrase,
String splitter) |
TranslationMap |
doImport()
This loads the translation files from classpath.
|
TranslationMap |
doImport(File folder)
This loads the translation files from the specified folder.
|
Translation |
get(String locale)
Returns the Translation object for the specified locale and returns null if not found.
|
Translation |
getWithFallBack(Locale locale)
Returns the Translation object for the specified locale and falls back to English if the
locale was not found.
|
String |
toString() |
public TranslationMap doImport(File folder)
public TranslationMap doImport()
public void add(Translation tr)
public Translation getWithFallBack(Locale locale)
public Translation get(String locale)
Copyright © 2012–2020. All rights reserved.