Package org.gvsig.i18n
Interface I18nManager
- All Known Implementing Classes:
I18nManagerImpl
public interface I18nManager
Management of I18n and Locale related activities.
- Author:
- David Cervera, Cèsar Ordiñana
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidexportLocaleForTranslation(Locale locale, Locale[] referenceLocales, File exportFile) Exports the keys of text to translate to a new locale to a jar file.voidexportLocaleForTranslation(Locale locale, Locale referenceLocale, File exportFile) Exports the keys of text to translate to a new locale to a jar file.voidexportLocaleForUpdate(Locale locale, Locale referenceLocale, File exportFile) Exports the translations of a locale to update or complete its translation, into a jar file.voidexportLocalesForUpdate(Locale[] locales, Locale referenceLocale, File exportFile) Exports the translations of a list of locales to update or complete its translation, into a jar file.Returns the current locale.Returns the application host system default locale.getDisplayName(Locale locale) Returns the display name of a locale.getDisplayName(Locale locale, Locale displayLocale) Returns the display name of a locale in the given locale to be displayed.Locale[]Returns the list of locales supported by the current gvSIG installation.getLanguageDisplayName(Locale locale) Returns the display name of a locale language.getLanguageDisplayName(Locale locale, Locale displayLocale) Returns the display name of a locale language.Locale[]Returns the list of default locales to use as reference when exporting to translate a new locale, or update or complete an existing one.voidinstallLocale(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.voidsetCurrentLocale(Locale locale) Sets the current application locale.voidsetDefaultLocales(Locale[] defaultLocales) Sets the list of default locales bundled with gvSIG.voidsetReferenceLocales(Locale[] referenceLocales) Sets the list of default locales to export.voiduninstallLocale(Locale locale) Uninstalls a locale and its translation.
-
Field Details
-
SPANISH
-
ENGLISH
-
-
Method Details
-
getLanguageDisplayName
Returns the display name of a locale language.- Parameters:
locale- to get the language display namedisplayLocale- the locale to display the name- Returns:
- the locale language display name
-
getLanguageDisplayName
Returns the display name of a locale language.- Parameters:
locale- to get the language display name- Returns:
- the locale language display name
-
getDisplayName
Returns the display name of a locale in the given locale to be displayed.- Parameters:
locale- to get the display namedisplayLocale- the locale to display the name- Returns:
- the locale display name
-
getDisplayName
Returns the display name of a locale.- Parameters:
locale- to get the display name- Returns:
- the locale display name
-
getCurrentLocale
Locale getCurrentLocale()Returns the current locale.- Returns:
- the current locale
-
setCurrentLocale
Sets the current application locale.- Parameters:
locale- the current application locale
-
getDefaultSystemLocale
Locale getDefaultSystemLocale()Returns the application host system default locale.- Returns:
- the default system locale
-
getInstalledLocales
Locale[] getInstalledLocales()Returns the list of locales supported by the current gvSIG installation.- Returns:
- the list of locales supported
-
installLocales
Installs or a new locale (or a list) and its translation, or updates an already existing one.- Parameters:
importFile- the jar or zip file which contains the locales and the translations as resource bundle files- Returns:
- the list of installed or updated locales
- Throws:
I18nException- if the locales could'n be installed
-
uninstallLocale
Uninstalls a locale and its translation.- Parameters:
locale- to uninstall- Throws:
I18nException- if the locale can't be uninstalled
-
exportLocaleForUpdate
void exportLocaleForUpdate(Locale locale, Locale referenceLocale, File exportFile) throws I18nException Exports the translations of a locale to update or complete its translation, into a jar file. Into the file is also included the translations of another existing locale to be used as reference for updating the locale.- Parameters:
locale- the locale to update or completereferenceLocale- the locale to be used as referenceexportFile- the jar file to export to- Throws:
I18nException- if the locale could not be exported for update
-
exportLocalesForUpdate
void exportLocalesForUpdate(Locale[] locales, Locale referenceLocale, File exportFile) throws I18nException Exports the translations of a list of locales to update or complete its translation, into a jar file. Into the file is also included the translations of another existing locale to be used as reference for updating the locale.- Parameters:
locales- the locales to update or completereferenceLocale- the locale to be used as referenceexportFile- the jar file to export to- Throws:
I18nException- if the locale could not be exported for update
-
exportLocaleForTranslation
void exportLocaleForTranslation(Locale locale, Locale referenceLocale, File exportFile) throws I18nException Exports the keys of text to translate to a new locale to a jar file. Into the file is also included the translations of another existing locale to be used as reference for translating to the new locale.- Parameters:
locale- the new locale to translate toreferenceLocale- the locale to be used as referenceexportFile- the jar file to export to- Throws:
I18nException- if the locale could not be exported for translation
-
exportLocaleForTranslation
void exportLocaleForTranslation(Locale locale, Locale[] referenceLocales, File exportFile) throws I18nException Exports the keys of text to translate to a new locale to a jar file. Into the file is also included the translations of another existing locales to be used as reference for translating to the new locale.- Parameters:
locale- the new locale to translate toreferenceLocales- the locales to be used as referenceexportFile- the jar file to export to- Throws:
I18nException- if the locale could not be exported for translation
-
getReferenceLocales
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.- Returns:
- the list of default locales to export
-
setReferenceLocales
Sets the list of default locales to export.- Parameters:
referenceLocales- the list of default locales to export
-
setDefaultLocales
Sets the list of default locales bundled with gvSIG. That list of locales will be used as the list of installed ones when gvSIG is run for the first time with the I18n extension. The following times, that list will be taken form the extension configuration in the plugins persistence.- Parameters:
defaultLocales-
-
installLocale
Install a new locale in the framework of andami. If the locale already exists update it.- Parameters:
locale- to install
-