Skip to content

A project to make GWT localization available on server-side

License

Notifications You must be signed in to change notification settings

talnikov/gwt-i18n-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 LocaleProxy.setLocale() with LocaleProxy.clear() to manually set thread-local locale.

Make sure you are executing LocaleProxy.initialize() before any LocaleFactory calls, or you will get "Messages not found" exception. An option to do this is to add I18nInitializer listener to your web.xml.

Client

Add <inherits name="com.teklabs.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://service.teklabs.com/nexus/content/repositories/public-snapshots/

Releases - https://service.teklabs.com/nexus/content/repositories/public-releases/

Latest release (for GWT 2.4):

    <dependency>
        <groupId>com.teklabs.gwt-i18n-server</groupId>
        <artifactId>gwt-i18n-server</artifactId>
        <version>0.12</version>
    </dependency>

About

A project to make GWT localization available on server-side

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.7%
  • Shell 0.3%