Class Localization
java.lang.Object
org.bgerp.app.l10n.Localization
A localization unit, loaded from l10n.xml for a plugin
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringgetLang()static StringgetLang(javax.servlet.http.HttpServletRequest request) Called from JSP.static LocalizationGets localization for the pluginstatic Localizerstatic LocalizergetLocalizer(String toLang, String... pluginIds) Retrieve localizer for a plugin.static LocalizergetLocalizer(String pluginId, javax.servlet.http.HttpServletRequest request) RetrievesLocalizerobject for a single pluginstatic LocalizergetLocalizer(javax.servlet.http.HttpServletRequest request) Retrieves a Localizer for a plugin, using request URIstatic final StringDeprecated.toString()
-
Field Details
-
FILE_NAME
- See Also:
-
LANG_SYS
- See Also:
-
LANG_RU
-
LANG_EN
-
LANG_DE
-
-
Method Details
-
getLocalization
Gets localization for the plugin- Parameters:
p- the plugin- Returns:
- localization if
FILE_NAMEexists for the plugin, or null if missing
-
toString
-
getLocalizer
Retrieves a Localizer for a plugin, using request URI- Parameters:
request- plugin ID is got out of getRequestURI()- Returns:
- the localizer
-
getLang
Called from JSP. Retrieves language from the request params or session. Once defined lang has persisted in the session attribute as well. If not found language is taken from configuration parameter 'lang'. If not defined there - returned 'ru'.- Parameters:
request-- Returns:
- the target language ID
-
getLang
- Returns:
- default UI language for open interface and the only one for others, read from the 'lang' configuration parameter
-
getSysLang
Deprecated.- Returns:
- same as
getLang(), kept under the old method name for compatibility
-
getLocalizer
Retrieve localizer for a plugin. The localizer includes the following localizations: custom if exists, than for kernel and after for the plugin itself. -
getLocalizer
-
getLocalizer
-