Skip to content

foal/gwt-locale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central Build Quality Gate Status

GWT java.util.Locale emulation

Emulation use the https://github.com/foal/gwt-language-tag internally. It provide almost all methods to work with Locale. Also it provide base set of registered locales as it defined in original java.util.Locale class.

All registered locales a returned by Locale.getAvailableLocales() call.

To register new locale you can use the org.jresearch.gwt.locale.client.locale.LocaleRegistry that allows to register new Locales based on components of languageTag.

There is also possible to create new locale by constructor of java.util.Locale, but such locale considering as temporary, and will not register automatically.

Issues about the adaptation should be reported here at GitHub.

CLDR Locales

There is also the separate GWT module GWT-locale-CLDR that provides the constants for all supported CLDR locales. The locales will be automatikally registerd if you add the module to the project

Using

  • Add the following project dependency to pom.xml
<dependency>
	<groupId>org.jresearch.gwt.locale</groupId>
	<artifactId>org.jresearch.gwt.locale</artifactId>
	<version>1.0.4</version>
</dependency>

Unimplemented or partial implemented features

  • java.util.Locale implementation may clash with original GWT implementation. See dicussion on Google Groups and similar issue with gwt-commons-lang3 (the class will separate to another project)* Compatibility with J2CL
  • Updates from Java 9-14
  • getDisplay methods
  • some specific Language Tag methods
  • java.util.Locale.Builder class
  • java.util.Locale.Category enum
  • java.util.Locale.LanguageRange class

FAQs

  1. What version of Java SE does this project map to? This project currently maps to the contents of release Java SE 8u20.

Releases

Available in the Maven Central repository

Support

GitHub issues and pull requests should be used when you want to help advance the project.

Note that pull requests and issues will only be considered so far as matching the behavior of Java SE releases. Additional requested features will be rejected.

Pull requests must not be copied from the JDK, because the GPL license is incompatible with the Apache license used here.

Building from sources

  • check out APT project and INSTALL (mvn clean install) it.
  • check out this project
  • mvn clean install
  • The project use the parent pom located on Sonatype snapshot repository.
<repositories>
    <repository>
        <id>oss.sonatype.org-snapshot</id>
        <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        <releases><enabled>false</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
    </repository>
</repositories>

or download directly https://oss.sonatype.org/content/repositories/snapshots/org/jresearch/org.jresearch.pom/29-SNAPSHOT/