开发者

Is it mandatory to provide a default locale.properties or @DefaultStringValue while using gwt internationalization?

I am using Static String Internationalization.

Locale.java

public interface Locale ex开发者_C百科tends Constants{

String kbps();

}

Locale_en.properties

kbps=Kbps1

Both are in the same package. In .gwt.xml, included following line:

<extend-property name="locale" values="en"/>

Now when I am compiling the code, i'm getting following error:

com.google.gwt.i18n.rebind.AbstractResource$MissingResourceException: No resource found for key 'kbps'

The above error goes away if I provide Locale.properties or @DefaultStringValue for the key. any idea why the gwt compile-time error is coming even if I am specifying the locale in the module XML?


Use <set-property-fallback name="locale" value="en"/> to define a default locale in your project


With extend-property, the "default" locale is still present, you are merely adding the "en" locale to the list of possible locales.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜