Package eu.webtoolkit.jwt
Class WXmlLocalizedStrings
java.lang.Object
eu.webtoolkit.jwt.WLocalizedStrings
eu.webtoolkit.jwt.WXmlLocalizedStrings
WXmlLocalizedStrings is a
WLocalizedStrings
implementation which uses an XML file as input resource.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveKey
(Locale locale, String key) Resolves a key in the given locale.resolvePluralKey
(Locale locale, String key, long amount) Resolves the plural form of a key in the given locale.void
Use an XML file as input resource.void
useBuiltin
(String bundle) Methods inherited from class eu.webtoolkit.jwt.WLocalizedStrings
evaluatePluralExpression, hibernate
-
Constructor Details
-
WXmlLocalizedStrings
public WXmlLocalizedStrings()Constructor.
-
-
Method Details
-
use
Use an XML file as input resource.- Parameters:
bundleName
-
-
resolveKey
Description copied from class:WLocalizedStrings
Resolves a key in the given locale.This method is used by
WString
to obtain the UTF-8 value corresponding to a key in the given locale.Returns a successful
LocalizedString
if the key could be resolved.- Specified by:
resolveKey
in classWLocalizedStrings
- See Also:
-
resolvePluralKey
Description copied from class:WLocalizedStrings
Resolves the plural form of a key in the given locale.This method is used by
WString
to obtain the UTF-8 value corresponding to a key in the current locale, taking into account the possibility of multiple plural forms, and chosing the right plural form based on theamount
passed.Throws a std::logic_error if the underlying implementation does not provide support for plural internationalized strings.
Returns a successful
LocalizedString
if the key could be resolved.- Overrides:
resolvePluralKey
in classWLocalizedStrings
-
useBuiltin
-