Home » Archived » BIRT » how to control the language of date format (like month)
how to control the language of date format (like month) [message #688201] |
Fri, 24 June 2011 03:02  |
Eclipse User |
|
|
|
for a chart x-axis, it is datetime.
I set the format to short, date time.
when I run the report, it show as a expected, but when run in client machine, the date shown strange symbol, it seems it cannot shown the chinese character about month.
is there any method to force the output to english like
May/12/2011 1:00 pm
instead of chinese
5月/12/2011 晚上1:00
also, which setting control the display of date to chinese or english? in browser or in windows regional settings??
for e.g. MMM/dd/yy HH:mm, what setting control the display of MMM to english or chinese?
My birt designer version is 2.2.1
[Updated on: Fri, 24 June 2011 03:07] by Moderator
|
|
| | | | | | | |
Re: how to control the language of date format (like month) [message #689644 is a reply to message #689481] |
Tue, 28 June 2011 00:03   |
Eclipse User |
|
|
|
My eclipse birt plugin version is
Eclipse BIRT Designer Version 2.2.1.r221_v20070924 Build <2.2.0.v20070924-1550
and so cannot run your attachment, but I copy
Quote:
reportContext.getDesignHandle().setStringProperty("locale", params["ReportLocale"].value);
in report beforeFactory method
and
Quote:
<scalar-parameter name="ReportLocale" id="23564029">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="paramType">simple</property>
<property name="controlType">list-box</property>
<property name="mustMatch">true</property>
<property name="fixedOrder">true</property>
<property name="distinct">true</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
<list-property name="selectionList">
<structure>
<property name="value">de_DE</property>
</structure>
<structure>
<property name="value">fr_FR</property>
</structure>
<structure>
<property name="value">zh_TW</property>
</structure>
<structure>
<property name="value">en_US</property>
</structure>
</list-property>
</scalar-parameter>
inside parameters attribute,
then when I run the report, the locale selection list come out, but whatever value I choose, the date display does not change (chinese, english, france...), why?
is the method not valid in birt version 2.2.1.r221_v20070924?
|
|
|
Re: how to control the language of date format (like month) [message #689878 is a reply to message #689644] |
Tue, 28 June 2011 10:23   |
Eclipse User |
|
|
|
In 2.2.1 you have to set it like
reportContext.getReportRunnable().designHandle.getDesignHandle().setStringProperty("locale",params["ReportLocale"]);
I believe.
Jason
On 6/28/2011 12:03 AM, forums-noreply@eclipse.org wrote:
> My eclipse birt plugin version is Eclipse BIRT Designer Version
> 2.2.1.r221_v20070924 Build <2.2.0.v20070924-1550
> and so cannot run your attachment, but I copy
> Quote:
>> reportContext.getDesignHandle().setStringProperty("locale",
>> params["ReportLocale"].value);
>
> in report beforeFactory method
> and Quote:
>> <scalar-parameter name="ReportLocale" id="23564029">
>> <property name="valueType">static</property>
>> <property name="dataType">string</property>
>> <property name="paramType">simple</property>
>> <property name="controlType">list-box</property>
>> <property name="mustMatch">true</property>
>> <property name="fixedOrder">true</property>
>> <property name="distinct">true</property>
>> <structure name="format">
>> <property name="category">Unformatted</property>
>> </structure>
>> <list-property name="selectionList">
>> <structure>
>> <property name="value">de_DE</property>
>> </structure>
>> <structure>
>> <property name="value">fr_FR</property>
>> </structure>
>> <structure>
>> <property name="value">zh_TW</property>
>> </structure>
>> <structure>
>> <property name="value">en_US</property>
>> </structure>
>> </list-property>
>> </scalar-parameter>
>
> inside parameters attribute, then when I run the report, the locale
> selection list come out, but whatever value I choose, the date display
> does not change (chinese, english, france...), why?
> is the method not valid in birt version 2.2.1.r221_v20070924?
|
|
| | | | | | | | | | | | | |
Goto Forum:
Current Time: Tue Jul 22 15:16:08 EDT 2025
Powered by FUDForum. Page generated in 0.08582 seconds
|