Package marauroa.common.i18n
Class I18N
java.lang.Object
marauroa.common.i18n.I18N
internationalization support
- Author:
- hendrik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddDictionaryFolder(String folder)adds a dictionary folder, so that games can make use of the same translation meachnismstatic Localegets the locale for this threadstatic voidinitialize the I18N systemstatic voidresets the locale for this threadstatic voidsetThreadLocale(Locale locale)sets the locale for this threadstatic Stringtranslates 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
-