Class WXmlLocalizedStrings

java.lang.Object
eu.webtoolkit.jwt.WLocalizedStrings
eu.webtoolkit.jwt.WXmlLocalizedStrings

public class WXmlLocalizedStrings extends WLocalizedStrings
WXmlLocalizedStrings is a WLocalizedStrings implementation which uses an XML file as input resource.
  • Constructor Details

    • WXmlLocalizedStrings

      public WXmlLocalizedStrings()
      Constructor.
  • Method Details

    • use

      public void use(String bundleName)
      Use an XML file as input resource.
      Parameters:
      bundleName -
    • resolveKey

      public LocalizedString resolveKey(Locale locale, String key)
      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 class WLocalizedStrings
      See Also:
    • resolvePluralKey

      public LocalizedString resolvePluralKey(Locale locale, String key, long amount)
      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 the amount 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 class WLocalizedStrings
    • useBuiltin

      public void useBuiltin(String bundle)