public class I18nManagerImpl extends Object implements I18nManager
ENGLISH, SPANISH| Constructor and Description |
|---|
I18nManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
static String |
capitalize(String text) |
void |
exportLocaleForTranslation(Locale locale,
Locale[] referenceLocales,
File exportFile)
Exports the keys of text to translate to a new locale to a jar file.
|
void |
exportLocaleForTranslation(Locale locale,
Locale referenceLocale,
File exportFile)
Exports the keys of text to translate to a new locale to a jar file.
|
void |
exportLocaleForUpdate(Locale locale,
Locale referenceLocale,
File exportFile)
Exports the translations of a locale to update or complete its
translation, into a jar file.
|
void |
exportLocalesForUpdate(Locale[] locales,
Locale referenceLocale,
File exportFile)
Exports the translations of a list of locales to update or complete its
translation, into a jar file.
|
Locale |
getCurrentLocale()
Returns the current locale.
|
Locale |
getDefaultSystemLocale()
Returns the application host system default locale.
|
String |
getDisplayName(Locale locale)
Returns the display name of a locale.
|
String |
getDisplayName(Locale locale,
Locale displayLocale)
Returns the display name of a locale in the given locale to be displayed.
|
Locale[] |
getInstalledLocales()
Returns the list of locales supported by the current gvSIG installation.
|
static I18nManager |
getInstance()
Returns the unique instance of the I18nManager.
|
String |
getLanguageDisplayName(Locale locale)
Returns the display name of a locale language.
|
String |
getLanguageDisplayName(Locale locale,
Locale displayLocale)
Returns the display name of a locale language.
|
Locale[] |
getReferenceLocales()
Returns the list of default locales to use as reference when exporting to
translate a new locale, or update or complete an existing one.
|
void |
installLocale(Locale locale)
Install a new locale in the framework of andami.
|
Locale[] |
installLocales(File importFile)
Installs or a new locale (or a list) and its translation, or updates an
already existing one.
|
void |
setCurrentLocale(Locale locale)
Sets the current application locale.
|
void |
setDefaultLocales(Locale[] defaultLocales)
Sets the list of default locales bundled with gvSIG.
|
void |
setReferenceLocales(Locale[] referenceLocales)
Sets the list of default locales to export.
|
void |
uninstallLocale(Locale locale)
Uninstalls a locale and its translation.
|
public static I18nManager getInstance()
public Locale getCurrentLocale()
I18nManagergetCurrentLocale in interface I18nManagerpublic Locale[] getInstalledLocales()
I18nManagergetInstalledLocales in interface I18nManagerpublic void setCurrentLocale(Locale locale)
I18nManagersetCurrentLocale in interface I18nManagerlocale - the current application localepublic Locale getDefaultSystemLocale()
I18nManagergetDefaultSystemLocale in interface I18nManagerpublic void installLocale(Locale locale)
I18nManagerinstallLocale in interface I18nManagerlocale - to installpublic void uninstallLocale(Locale locale) throws I18nException
I18nManageruninstallLocale in interface I18nManagerlocale - to uninstallI18nException - if the locale can't be uninstalledpublic String getDisplayName(Locale locale)
I18nManagergetDisplayName in interface I18nManagerlocale - to get the display namepublic String getDisplayName(Locale locale, Locale displayLocale)
I18nManagergetDisplayName in interface I18nManagerlocale - to get the display namedisplayLocale - the locale to display the namepublic String getLanguageDisplayName(Locale locale)
I18nManagergetLanguageDisplayName in interface I18nManagerlocale - to get the language display namepublic String getLanguageDisplayName(Locale locale, Locale displayLocale)
I18nManagergetLanguageDisplayName in interface I18nManagerlocale - to get the language display namedisplayLocale - the locale to display the namepublic Locale[] installLocales(File importFile) throws I18nException
I18nManagerinstallLocales in interface I18nManagerimportFile - the jar or zip file which contains the locales and the
translations as resource bundle filesI18nException - if the locales could'n be installedpublic void exportLocaleForUpdate(Locale locale, Locale referenceLocale, File exportFile) throws I18nException
I18nManagerexportLocaleForUpdate in interface I18nManagerlocale - the locale to update or completereferenceLocale - the locale to be used as referenceexportFile - the jar file to export toI18nException - if the locale could not be exported for updatepublic void exportLocalesForUpdate(Locale[] locales, Locale referenceLocale, File exportFile) throws I18nException
I18nManagerexportLocalesForUpdate in interface I18nManagerlocales - the locales to update or completereferenceLocale - the locale to be used as referenceexportFile - the jar file to export toI18nException - if the locale could not be exported for updatepublic void exportLocaleForTranslation(Locale locale, Locale referenceLocale, File exportFile) throws I18nException
I18nManagerexportLocaleForTranslation in interface I18nManagerlocale - the new locale to translate toreferenceLocale - the locale to be used as referenceexportFile - the jar file to export toI18nException - if the locale could not be exported for translationpublic void exportLocaleForTranslation(Locale locale, Locale[] referenceLocales, File exportFile) throws I18nException
I18nManagerexportLocaleForTranslation in interface I18nManagerlocale - the new locale to translate toreferenceLocales - the locales to be used as referenceexportFile - the jar file to export toI18nException - if the locale could not be exported for translationpublic Locale[] getReferenceLocales()
I18nManagergetReferenceLocales in interface I18nManagerpublic void setReferenceLocales(Locale[] referenceLocales)
I18nManagersetReferenceLocales in interface I18nManagerreferenceLocales - the list of default locales to exportpublic void setDefaultLocales(Locale[] defaultLocales)
I18nManagersetDefaultLocales in interface I18nManager