GWT I18N on the server side

前端 未结 2 1444
醉酒成梦
醉酒成梦 2020-12-30 08:09

What is the best way to implement GWT Server Side Internationalization?

  1. Use native Java properties files (not sure how to read and how to locate the right l

2条回答
  •  天命终不由人
    2020-12-30 08:39

    I found this solution and it looks very good

    gwt-i18n-server - Provides a simple support of gwt i18n feature on the server side

    The aim is to permit to the GWT developer to use their Constants and Messages interfaces on the server side (See internationzation). The implementation is based on java reflect api. It loads the properties files from the classpath (same folder than the interface). It supports Constants, ConstantsWithLookup, Messages (plural too). The licence is LGPL.

    Client current locale can be found this way:

    LocaleInfo.getCurrentLocale().getLocaleName()
    

提交回复
热议问题