将我的 gwt 应用程序设置为“国际化”后,我遇到了一些问题。
我的应用程序.gwt.xml:
<module rename-to='app'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.i18n.I18N" />
<!-- Inherit the default GWT style sheet. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Specify the app entry point class. -->
<entry-point class='dk.blabla.app.client.Entry' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<!-- Specify the locales you will be supporting -->
<extend-property name="locale" values="da" />
</module>
然后我将以下内容添加到 app.html header
<meta name="gwt:property" content="locale=en">
现在我无法在托管模式下启动我的应用程序。我收到以下错误
[ERROR] [app] - Deferred binding failed for 'com.google.gwt.i18n.client.impl.CldrImpl'; expect subsequent failures
[ERROR] [app] Unable to load module entry point class dk.blabla.app.client.App (see associated exception for details) java.lang.RuntimeException: Deferred binding failed for 'com.google.gwt.i18n.client.impl.CldrImpl' (did you forget to inherit a required module?)
编辑:
顺便说一下,我正在使用 eclipse 和 google 插件。
最佳答案
我认为你应该添加
<inherits name="com.google.gwt.i18n.CldrLocales"/>
到您的 app.gwt.xml。 有关详细信息,请参阅 Runtime Locales
关于java - GWT:本地化后托管模式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4806876/