• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

lightoze/gwt-i18n-server: A project to make GWT localization available on server ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

lightoze/gwt-i18n-server

开源软件地址(OpenSource Url):

https://github.com/lightoze/gwt-i18n-server

开源编程语言(OpenSource Language):

Java 99.8%

开源软件介绍(OpenSource Introduction):

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap