简体   繁体   English

GWT I18n配置

[英]GWT I18n configuration

I understand that if the gwt application needs to support multiple locale values, all of them should be configured in module xml as 我了解,如果gwt应用程序需要支持多个语言环境值,则应在模块xml中将它们全部配置为

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

and then the GWT will decide which locale to load run time using either query string or meta tag in host page . 然后GWT将使用主机页中的 查询字符串meta标记决定要加载运行时间的语言环境。

But, for the application to support all the locales available, how should i configure in module xml file? 但是,要使该应用程序支持所有可用的语言环境,应如何在模块xml文件中进行配置? Should i add extend-property tag for all the locales or is any other configuration available for this? 我应该为所有语言环境添加扩展属性标签,还是为此提供任何其他配置? Please advice. 请指教。

Yes, that's what you need to do. 是的,这就是您需要做的。 In the file com.google.gwt.i18n.CldrLocales.gwt.xml you can find all locales. 在文件com.google.gwt.i18n.CldrLocales.gwt.xml您可以找到所有语言环境。 Using the list in that file with some smart copy/replace you could create the configuration you require. 使用该文件中的列表进行一些智能复制/替换,您可以创建所需的配置。

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... 这意味着您至少会获得〜450(〜区域设置数量)* 6(不同支持的浏览器)排列或2700个不同的html文件,这可能需要数小时甚至数天的时间来编译...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM