GWT 2.7.0

com.google.gwt.i18n.shared
Interface GwtLocaleFactory

All Known Implementing Classes:
GwtLocaleFactoryImpl

public interface GwtLocaleFactory

Factories that know how to create GwtLocale instances.


Method Summary
 GwtLocale fromComponents(java.lang.String language, java.lang.String script, java.lang.String region, java.lang.String variant)
          Construct a GWT locale from its component parts.
 GwtLocale fromString(java.lang.String localeName)
          Get a GWT locale from a string conforming to a subset of BCP47 (specifically assuming extension tags are not present, at most one variant is present, and grandfathered tags are not supported; also private-use tags are only supported for the entire tag).
 GwtLocale getDefault()
          Returns an instance of the default locale.
 

Method Detail

fromComponents

GwtLocale fromComponents(java.lang.String language,
                         java.lang.String script,
                         java.lang.String region,
                         java.lang.String variant)
Construct a GWT locale from its component parts. Null or empty strings are accepted for parts not present.

Parameters:
language -
script -
region -
variant -
Returns:
GwtLocale instance, unique for a given set of values

fromString

GwtLocale fromString(java.lang.String localeName)
Get a GWT locale from a string conforming to a subset of BCP47 (specifically assuming extension tags are not present, at most one variant is present, and grandfathered tags are not supported; also private-use tags are only supported for the entire tag). Only minimal validation of BCP47 tags is performed, and will continue with what it is able to parse if unexpected input is encountered. A null or empty string is treated as the default locale.

Parameters:
localeName -
Returns:
a locale instance, always the same one for a given localeName

getDefault

GwtLocale getDefault()
Returns an instance of the default locale.


GWT 2.7.0