public interface I18nManager
Modifier and Type | Field and Description |
---|---|
static Locale |
ENGLISH |
static Locale |
SPANISH |
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
String getLanguageDisplayName(Locale locale, Locale displayLocale)
locale
- to get the language display namedisplayLocale
- the locale to display the nameString getLanguageDisplayName(Locale locale)
locale
- to get the language display nameString getDisplayName(Locale locale, Locale displayLocale)
locale
- to get the display namedisplayLocale
- the locale to display the nameString getDisplayName(Locale locale)
locale
- to get the display nameLocale getCurrentLocale()
void setCurrentLocale(Locale locale)
locale
- the current application localeLocale getDefaultSystemLocale()
Locale[] getInstalledLocales()
Locale[] installLocales(File importFile) throws I18nException
importFile
- the jar or zip file which contains the locales and the
translations as resource bundle filesI18nException
- if the locales could'n be installedvoid uninstallLocale(Locale locale) throws I18nException
locale
- to uninstallI18nException
- if the locale can't be uninstalledvoid exportLocaleForUpdate(Locale locale, Locale referenceLocale, File exportFile) throws I18nException
locale
- 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 updatevoid exportLocalesForUpdate(Locale[] locales, Locale referenceLocale, File exportFile) throws I18nException
locales
- 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 updatevoid exportLocaleForTranslation(Locale locale, Locale referenceLocale, File exportFile) throws I18nException
locale
- 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 translationvoid exportLocaleForTranslation(Locale locale, Locale[] referenceLocales, File exportFile) throws I18nException
locale
- 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 translationLocale[] getReferenceLocales()
void setReferenceLocales(Locale[] referenceLocales)
referenceLocales
- the list of default locales to exportvoid setDefaultLocales(Locale[] defaultLocales)
defaultLocales
- void installLocale(Locale locale)
locale
- to install