GWT I18n配置 [英] GWT I18n configuration

查看:64
本文介绍了GWT I18n配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解,如果gwt应用程序需要支持多个语言环境值,则所有这些值都应在模块xml中配置为

I understand that if the gwt application needs to support multiple locale values, all of them should be configured in module xml as

 <extend-property name="locale" values="de"/>
 <extend-property name="locale" values="es"/>

,然后GWT将使用主机页面中的查询字符串 meta标签决定加载运行时的语言环境.

and then the GWT will decide which locale to load run time using either query string or meta tag in host page.

但是,要使该应用程序支持所有可用的语言环境,应如何在模块xml文件中进行配置?我应该为所有语言环境添加扩展属性标签,还是为此提供任何其他配置?请指教.

But, for the application to support all the locales available, how should i configure in module xml file? Should i add extend-property tag for all the locales or is any other configuration available for this? Please advice.

推荐答案

是的,这就是您需要做的.在文件com.google.gwt.i18n.CldrLocales.gwt.xml中,您可以找到所有语言环境.使用该文件中的列表进行一些智能复制/替换,您可以创建所需的配置.

Yes, that's what you need to do. In the file com.google.gwt.i18n.CldrLocales.gwt.xml you can find all locales. Using the list in that file with some smart copy/replace you could create the configuration you require.

但我怀疑您是否真的想这样做.这意味着您至少会获得〜450(〜区域设置)* 6(不同的受支持的浏览器)排列或2700个不同的html文件,这可能需要数小时甚至数天的时间来编译...

But I doubt you really want to do this. It means you get at least ~450(~number of locales) * 6(different supported browsers) permutations or 2700 different html files, which probably would take hours or even days to compile...

这篇关于GWT I18n配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆