public interface I18nManager
Modifier and Type | Field and Description |
---|---|
static java.util.Locale |
ENGLISH |
static java.util.Locale |
SPANISH |
Modifier and Type | Method and Description |
---|---|
void |
exportLocaleForTranslation(java.util.Locale locale,
java.util.Locale[] referenceLocales,
java.io.File exportFile)
Exports the keys of text to translate to a new locale to a jar file.
|
void |
exportLocaleForTranslation(java.util.Locale locale,
java.util.Locale referenceLocale,
java.io.File exportFile)
Exports the keys of text to translate to a new locale to a jar file.
|
void |
exportLocaleForUpdate(java.util.Locale locale,
java.util.Locale referenceLocale,
java.io.File exportFile)
Exports the translations of a locale to update or complete its
translation, into a jar file.
|
void |
exportLocalesForUpdate(java.util.Locale[] locales,
java.util.Locale referenceLocale,
java.io.File exportFile)
Exports the translations of a list of locales to update or complete its
translation, into a jar file.
|
java.util.Locale |
getCurrentLocale()
Returns the current locale.
|
java.util.Locale |
getDefaultSystemLocale()
Returns the application host system default locale.
|
java.lang.String |
getDisplayName(java.util.Locale locale)
Returns the display name of a locale.
|
java.lang.String |
getDisplayName(java.util.Locale locale,
java.util.Locale displayLocale)
Returns the display name of a locale in the given locale to be displayed.
|
java.util.Locale[] |
getInstalledLocales()
Returns the list of locales supported by the current gvSIG installation.
|
java.lang.String |
getLanguageDisplayName(java.util.Locale locale)
Returns the display name of a locale language.
|
java.lang.String |
getLanguageDisplayName(java.util.Locale locale,
java.util.Locale displayLocale)
Returns the display name of a locale language.
|
java.util.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(java.util.Locale locale)
Install a new locale in the framework of andami.
|
java.util.Locale[] |
installLocales(java.io.File importFile)
Installs or a new locale (or a list) and its translation, or updates an
already existing one.
|
void |
setCurrentLocale(java.util.Locale locale)
Sets the current application locale.
|
void |
setDefaultLocales(java.util.Locale[] defaultLocales)
Sets the list of default locales bundled with gvSIG.
|
void |
setReferenceLocales(java.util.Locale[] referenceLocales)
Sets the list of default locales to export.
|
void |
uninstallLocale(java.util.Locale locale)
Uninstalls a locale and its translation.
|
static final java.util.Locale SPANISH
static final java.util.Locale ENGLISH
java.lang.String getLanguageDisplayName(java.util.Locale locale, java.util.Locale displayLocale)
locale
- to get the language display namedisplayLocale
- the locale to display the namejava.lang.String getLanguageDisplayName(java.util.Locale locale)
locale
- to get the language display namejava.lang.String getDisplayName(java.util.Locale locale, java.util.Locale displayLocale)
locale
- to get the display namedisplayLocale
- the locale to display the namejava.lang.String getDisplayName(java.util.Locale locale)
locale
- to get the display namejava.util.Locale getCurrentLocale()
void setCurrentLocale(java.util.Locale locale)
locale
- the current application localejava.util.Locale getDefaultSystemLocale()
java.util.Locale[] getInstalledLocales()
java.util.Locale[] installLocales(java.io.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(java.util.Locale locale) throws I18nException
locale
- to uninstallI18nException
- if the locale can't be uninstalledvoid exportLocaleForUpdate(java.util.Locale locale, java.util.Locale referenceLocale, java.io.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(java.util.Locale[] locales, java.util.Locale referenceLocale, java.io.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(java.util.Locale locale, java.util.Locale referenceLocale, java.io.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(java.util.Locale locale, java.util.Locale[] referenceLocales, java.io.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 translationjava.util.Locale[] getReferenceLocales()
void setReferenceLocales(java.util.Locale[] referenceLocales)
referenceLocales
- the list of default locales to exportvoid setDefaultLocales(java.util.Locale[] defaultLocales)
defaultLocales
- void installLocale(java.util.Locale locale)
locale
- to install