Package marauroa.common.i18n
Class I18N
java.lang.Object
marauroa.common.i18n.I18N
internationalization support
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addDictionaryFolder(String folder)
adds a dictionary folder, so that games can make use of the same translation meachnismstatic Locale
gets the locale for this threadstatic void
initialize the I18N systemstatic void
resets the locale for this threadstatic void
setThreadLocale(Locale locale)
sets the locale for this threadstatic String
translates the text to the thread language
-
Constructor Details
-
I18N
public I18N()
-
-
Method Details
-
init
initialize the I18N system- Parameters:
locale
- default locale
-
addDictionaryFolder
adds a dictionary folder, so that games can make use of the same translation meachnism- Parameters:
folder
- classpath folder to add
-
setThreadLocale
sets the locale for this thread- Parameters:
locale
- locale to set
-
resetThreadLocale
public static void resetThreadLocale()resets the locale for this thread -
getLocale
gets the locale for this thread- Returns:
- locale
-
translate
translates the text to the thread language- Parameters:
key
- text to translateargs
- optional arguments- Returns:
- translated text
-