Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Localization problem
fatboyslim
Hi all,
I've written a simple BIRT report, I want to internationise it, well, have dynamic chinese and english labels, depending on the locale of the user.
I've generated four *.properties files;
MyProperties_en.properties
MyProperties_en_GB.properties
MyProperties_zh.properties
MyProperties_zh_CN.properties
If I directly add these as the chinese property files as the default properties file to the report definition, i.e.
<property name="includeResource">report/MyResource_zh</property>
the chinese characters do appear regardless of the user's locale.
And conversely, if I add the default MyProperties_en(_UK).properties as the default properties file, the chinese characters do not appear only english, even when the user?s locale is ?zh_CN?.
I've outputted the user's locale on the report using:
<text-property name="content"><![CDATA[<value-of>reportContext.getLocale()</value-of>]]></text-property>
for the UK user I get "en_GB" for the Chinese user I get "zh_CN" on the report.
Can anyone help? I'm stuck. Thanks in advance,
FBS
Find more posts tagged with
Comments
fatboyslim
Yup found the answer .. I needed a MyResource.properties specified as the default in the report definition.