GWT: getting compile-time locales list from external resource
We need to store locales list externally in our project and just let GWT to read it at compile-time to produce permutations.
So, instead of this:
<extend-property name="locale" values="en_US" />
<extend-property name="locale" values="ru_RU" />
<extend-property name="locale" values="fr_FR" />
<extend-property name="locale" values="es_ES" />
We need something like:
<use-property name="locale" source="../../localesList.properties" if-not-found="en_US,fr_FE,es_ES" />
property-providers is a different thing, because they help for client to determine locale at run-time, so they will not produce those funny permutations
The worse way is to inject locale properties in EntryPoint.gwt.xml using some script at server-side
Do I missed something or there is no other way to make this in GWT excludin开发者_如何学运维g this injection?
I'd preprocess the *.gwt.xml file(s) and add the needed locales (say, use an ant task, and just do some dom manipulation, or even, just use a @FILTER@ filter to do a replace), before compiling the gwt code.
加载中,请稍侯......
精彩评论