Skip to content

Latest commit

 

History

170 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LGPLv3 License Build Status Maven Central

Usage

You can use LocaleFactory.get(Class<T extends LocalizableResource> cls) to obtain Messages, Constants or ConstantsWithLookup both on server and client side.

Server

Add I18nFilter to web.xml or use ThreadLocalLocaleProvider.pushLocale(Locale) with ThreadLocalLocaleProvider.popLocale() to manually set thread-local locale.

Also there are a couple of additional server-only features like MessagesWithLookup interface and encoding proxies, which allow you to use localization in a more dynamic way.

Note: Unfortunately GWT-specific message formats (described here) are currently not supported except for the "static argument" format ({startBold,<b>}).

Client

Add <inherits name="net.lightoze.gwt.i18n.GwtI18nServer"/> to your GWT XML module descriptor.

Call LocaleFactory.put(MyMessages.class, GWT.<MyMessages>create(MyMessages.class)) in your EntryPoint.

Maven repositories

Snapshots - https://oss.sonatype.org/content/groups/public/

Releases - Maven Central

Latest release (for GWT 2.8.1):

    <dependency>
        <groupId>net.lightoze.gwt-i18n-server</groupId>
        <artifactId>gwt-i18n-server</artifactId>
        <version>0.25</version>
    </dependency>

This artifact contains a copy of com.google.gwt.i18n package from GWT distribution, so you don't have to deploy the whole GWT library on the server. In case you want only gwt-i18n-server classes, use an artifact with original classifier.

About

A project to make GWT localization available on server side

Resources

Stars

39 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages