Interface I18nHelper
- All Known Implementing Classes:
DefaultI18nHelper
public interface I18nHelper
Simple helper tool for getting translated strings.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
SYNTHETIC_LANGUAGE_TAG
Special language tag that makes helper to return untranslated translation keys instead of translations.- See Also:
-
SYNTHETIC_LANGUAGE
Special locale that makes helper to return untranslated translation keys instead of translations.
-
-
Method Details
-
getText
Get translated string for provided key for current user locale.- Parameters:
key
- translation key (can be either simple key or pair namespace:key) Examples: `key.to.translate`, `common:key.to.translate`args
- values to pass into translation- Returns:
- translated string
-
getText
Get translated string for provided key for provided locale.- Parameters:
locale
- requested locale of translationkey
- translation key (can be either simple key or pair namespace:key) Examples: `key.to.translate`, `common:key.to.translate`args
- values to pass into translation- Returns:
- translated string
-