Skip to main content



      Home
Home » Archived » BIRT » localization support
localization support [message #250069] Thu, 26 July 2007 14:21 Go to next message
Eclipse UserFriend
Originally posted by: mackingzone.gmail.com

Hmm... just finished reading a very tiny section in the 'A Field Guide to
Reporting' on 'Localizing Text', I'm a bit confused with the localization
support from BIRT.

In the Report Designer, user can only attach one resource file to the
given report, is that so, because the Designer is for design purpose? If
I were to deploy the .rptdesign to my running Tomcat with the BIRT run
time environment, is it impossible to support locale dynamically if I
don't do it programmatically?

Any pointers are greatly appreciate,
Ethan
Re: localization support [message #250091 is a reply to message #250069] Thu, 26 July 2007 18:18 Go to previous messageGo to next message
Eclipse UserFriend
BIRT uses a similiar mechanism to the Java resource bundles
( http://java.sun.com/developer/technicalArticles/Intl/Resourc eBundles/).
When you assign a resouce file named "msg.properties" with default
translations then you can provide further translation files in the same
directory for other languages/locales e.g. msg_fr.properties,
msg_ja.properties, ... To test the different locales in Report Designer
switch to the desired language via Window > Preferences > Report Design >
Preview. When you deploy your report design into your runtime environment
you must also deploy your resource files.

Spunk

"Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
news:661b298c57e20e65afab64aa183629a0$1@www.eclipse.org...
> Hmm... just finished reading a very tiny section in the 'A Field Guide to
> Reporting' on 'Localizing Text', I'm a bit confused with the localization
> support from BIRT.
>
> In the Report Designer, user can only attach one resource file to the
> given report, is that so, because the Designer is for design purpose? If
> I were to deploy the .rptdesign to my running Tomcat with the BIRT run
> time environment, is it impossible to support locale dynamically if I
> don't do it programmatically?
>
> Any pointers are greatly appreciate,
> Ethan
>
Re: localization support [message #250101 is a reply to message #250091] Thu, 26 July 2007 19:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mackingzone.gmail.com

Hi Spunk,

Thanks for your reply. But that's also what I did. I guess I wasn't
being clear on my questions.

Say, I want my report to support 3 different languages (en_US, es_AR and
fr_CA) when it's being viewed.

In theory, 3 property files would be created and they are in the location
where the .rptdesign file would have access to, and when the user uses
'__locale=en_US' in the url, the viewer should be able to look up the
right 'resource_en_US.properties' to render all the labels and static
texts.

Can this be done without modifying the existing viewer code? Or do I need
to write my own code to have this supported?

Thanks,
Ethan

Der Spunk wrote:

> BIRT uses a similiar mechanism to the Java resource bundles
> ( http://java.sun.com/developer/technicalArticles/Intl/Resourc eBundles/).
> When you assign a resouce file named "msg.properties" with default
> translations then you can provide further translation files in the same
> directory for other languages/locales e.g. msg_fr.properties,
> msg_ja.properties, ... To test the different locales in Report Designer
> switch to the desired language via Window > Preferences > Report Design >
> Preview. When you deploy your report design into your runtime environment
> you must also deploy your resource files.

> Spunk

> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
> news:661b298c57e20e65afab64aa183629a0$1@www.eclipse.org...
>> Hmm... just finished reading a very tiny section in the 'A Field Guide to
>> Reporting' on 'Localizing Text', I'm a bit confused with the localization
>> support from BIRT.
>>
>> In the Report Designer, user can only attach one resource file to the
>> given report, is that so, because the Designer is for design purpose? If
>> I were to deploy the .rptdesign to my running Tomcat with the BIRT run
>> time environment, is it impossible to support locale dynamically if I
>> don't do it programmatically?
>>
>> Any pointers are greatly appreciate,
>> Ethan
>>
Re: localization support [message #250220 is a reply to message #250101] Fri, 27 July 2007 15:07 Go to previous messageGo to next message
Eclipse UserFriend
This works with the Viewer out of the box. Just try it.

Spunk


"Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
news:dce01449588224f2754d97b2e9c4ef9b$1@www.eclipse.org...
> Hi Spunk,
>
> Thanks for your reply. But that's also what I did. I guess I wasn't
> being clear on my questions.
>
> Say, I want my report to support 3 different languages (en_US, es_AR and
> fr_CA) when it's being viewed.
> In theory, 3 property files would be created and they are in the location
> where the .rptdesign file would have access to, and when the user uses
> '__locale=en_US' in the url, the viewer should be able to look up the
> right 'resource_en_US.properties' to render all the labels and static
> texts.
> Can this be done without modifying the existing viewer code? Or do I need
> to write my own code to have this supported?
>
> Thanks,
> Ethan
>
> Der Spunk wrote:
>
>> BIRT uses a similiar mechanism to the Java resource bundles
>> ( http://java.sun.com/developer/technicalArticles/Intl/Resourc eBundles/).
>> When you assign a resouce file named "msg.properties" with default
>> translations then you can provide further translation files in the same
>> directory for other languages/locales e.g. msg_fr.properties,
>> msg_ja.properties, ... To test the different locales in Report Designer
>> switch to the desired language via Window > Preferences > Report Design >
>> Preview. When you deploy your report design into your runtime environment
>> you must also deploy your resource files.
>
>> Spunk
>
>> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
>> news:661b298c57e20e65afab64aa183629a0$1@www.eclipse.org...
>>> Hmm... just finished reading a very tiny section in the 'A Field Guide
>>> to Reporting' on 'Localizing Text', I'm a bit confused with the
>>> localization support from BIRT.
>>>
>>> In the Report Designer, user can only attach one resource file to the
>>> given report, is that so, because the Designer is for design purpose?
>>> If I were to deploy the .rptdesign to my running Tomcat with the BIRT
>>> run time environment, is it impossible to support locale dynamically if
>>> I don't do it programmatically?
>>>
>>> Any pointers are greatly appreciate,
>>> Ethan
>>>
>
>
Re: localization support [message #250223 is a reply to message #250220] Fri, 27 July 2007 15:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mackingzone.gmail.com

Hi Spunk,

Could you please walk me through? Or could you point out what I missed in
my following steps?

1) In the Report Designer, I added "MyResource_es_AR" as the Resource
File, noted that the Report Designer only allows me to enter one Resource
file. In the xml, I would see,
<property name="includeResource">MyResource_es_AR</property>

2) Copy my report (report.rptdesign) to my web viewer directory, along
with all my other resource files (MyResource_es_AR.properties,
MyResource_en_US.properties and MyResource_fr_CA.properties), and place
them in the same folder.

3) Now, on the brower, I do,
http://localhost:8080/viewerEngine/frameset?__report=report. rptdesign&__locale=en_US

My hope is that the viewer would be smart enough to retrieve all the
localized text from MyResource_en_US.properties instead of the
'MyResource_es_AR.properties'.

But in my test, it doesn't seem to work, it still points to the
'MyResource_es_AR.properties' which is what I have used in my Report
Design.


Thanks,
Ethan

Der Spunk wrote:

> This works with the Viewer out of the box. Just try it.

> Spunk


> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
> news:dce01449588224f2754d97b2e9c4ef9b$1@www.eclipse.org...
>> Hi Spunk,
>>
>> Thanks for your reply. But that's also what I did. I guess I wasn't
>> being clear on my questions.
>>
>> Say, I want my report to support 3 different languages (en_US, es_AR and
>> fr_CA) when it's being viewed.
>> In theory, 3 property files would be created and they are in the location
>> where the .rptdesign file would have access to, and when the user uses
>> '__locale=en_US' in the url, the viewer should be able to look up the
>> right 'resource_en_US.properties' to render all the labels and static
>> texts.
>> Can this be done without modifying the existing viewer code? Or do I need
>> to write my own code to have this supported?
>>
>> Thanks,
>> Ethan
>>
>> Der Spunk wrote:
>>
>>> BIRT uses a similiar mechanism to the Java resource bundles
>>> ( http://java.sun.com/developer/technicalArticles/Intl/Resourc eBundles/).
>>> When you assign a resouce file named "msg.properties" with default
>>> translations then you can provide further translation files in the same
>>> directory for other languages/locales e.g. msg_fr.properties,
>>> msg_ja.properties, ... To test the different locales in Report Designer
>>> switch to the desired language via Window > Preferences > Report Design >
>>> Preview. When you deploy your report design into your runtime environment
>>> you must also deploy your resource files.
>>
>>> Spunk
>>
>>> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
>>> news:661b298c57e20e65afab64aa183629a0$1@www.eclipse.org...
>>>> Hmm... just finished reading a very tiny section in the 'A Field Guide
>>>> to Reporting' on 'Localizing Text', I'm a bit confused with the
>>>> localization support from BIRT.
>>>>
>>>> In the Report Designer, user can only attach one resource file to the
>>>> given report, is that so, because the Designer is for design purpose?
>>>> If I were to deploy the .rptdesign to my running Tomcat with the BIRT
>>>> run time environment, is it impossible to support locale dynamically if
>>>> I don't do it programmatically?
>>>>
>>>> Any pointers are greatly appreciate,
>>>> Ethan
>>>>
>>
>>
Re: localization support [message #250239 is a reply to message #250223] Fri, 27 July 2007 19:58 Go to previous messageGo to next message
Eclipse UserFriend
Rename your default locale file from "MyResource_es_AR.properties" to
"MyResource.properties". Then use this file as the Resouce File in the
report:
<property name="includeResource">MyResource</property>

Now deploy everything and hopefully enjoy...

Spunk

"Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
news:67e2e7b037822fc0167ad5ee76c8ac9f$1@www.eclipse.org...
> Hi Spunk,
>
> Could you please walk me through? Or could you point out what I missed in
> my following steps?
>
> 1) In the Report Designer, I added "MyResource_es_AR" as the Resource
> File, noted that the Report Designer only allows me to enter one Resource
> file. In the xml, I would see,
> <property name="includeResource">MyResource_es_AR</property>
>
> 2) Copy my report (report.rptdesign) to my web viewer directory, along
> with all my other resource files (MyResource_es_AR.properties,
> MyResource_en_US.properties and MyResource_fr_CA.properties), and place
> them in the same folder.
>
> 3) Now, on the brower, I do,
> http://localhost:8080/viewerEngine/frameset?__report=report. rptdesign&__locale=en_US
>
> My hope is that the viewer would be smart enough to retrieve all the
> localized text from MyResource_en_US.properties instead of the
> 'MyResource_es_AR.properties'.
>
> But in my test, it doesn't seem to work, it still points to the
> 'MyResource_es_AR.properties' which is what I have used in my Report
> Design.
>
>
> Thanks,
> Ethan
>
> Der Spunk wrote:
>
>> This works with the Viewer out of the box. Just try it.
>
>> Spunk
>
>
>> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
>> news:dce01449588224f2754d97b2e9c4ef9b$1@www.eclipse.org...
>>> Hi Spunk,
>>>
>>> Thanks for your reply. But that's also what I did. I guess I wasn't
>>> being clear on my questions.
>>>
>>> Say, I want my report to support 3 different languages (en_US, es_AR and
>>> fr_CA) when it's being viewed.
>>> In theory, 3 property files would be created and they are in the
>>> location where the .rptdesign file would have access to, and when the
>>> user uses '__locale=en_US' in the url, the viewer should be able to look
>>> up the right 'resource_en_US.properties' to render all the labels and
>>> static texts.
>>> Can this be done without modifying the existing viewer code? Or do I
>>> need to write my own code to have this supported?
>>>
>>> Thanks,
>>> Ethan
>>>
>>> Der Spunk wrote:
>>>
>>>> BIRT uses a similiar mechanism to the Java resource bundles
>>>> ( http://java.sun.com/developer/technicalArticles/Intl/Resourc eBundles/).
>>>> When you assign a resouce file named "msg.properties" with default
>>>> translations then you can provide further translation files in the same
>>>> directory for other languages/locales e.g. msg_fr.properties,
>>>> msg_ja.properties, ... To test the different locales in Report Designer
>>>> switch to the desired language via Window > Preferences > Report Design
>>>> > Preview. When you deploy your report design into your runtime
>>>> environment you must also deploy your resource files.
>>>
>>>> Spunk
>>>
>>>> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
>>>> news:661b298c57e20e65afab64aa183629a0$1@www.eclipse.org...
>>>>> Hmm... just finished reading a very tiny section in the 'A Field Guide
>>>>> to Reporting' on 'Localizing Text', I'm a bit confused with the
>>>>> localization support from BIRT.
>>>>>
>>>>> In the Report Designer, user can only attach one resource file to the
>>>>> given report, is that so, because the Designer is for design purpose?
>>>>> If I were to deploy the .rptdesign to my running Tomcat with the BIRT
>>>>> run time environment, is it impossible to support locale dynamically
>>>>> if I don't do it programmatically?
>>>>>
>>>>> Any pointers are greatly appreciate,
>>>>> Ethan
>>>>>
>>>
>>>
>
>
Re: localization support [message #250243 is a reply to message #250239] Fri, 27 July 2007 20:20 Go to previous message
Eclipse UserFriend
Originally posted by: mackingzone.gmail.com

Hi Spunk,

Thanks! All are working good! :)

On a side note, just wondering how good BIRT deals with reports where the
data returned by the data set is multibyte. Any input from anyone?

Thanks,
Ethan


Der Spunk wrote:

> Rename your default locale file from "MyResource_es_AR.properties" to
> "MyResource.properties". Then use this file as the Resouce File in the
> report:
> <property name="includeResource">MyResource</property>

> Now deploy everything and hopefully enjoy...

> Spunk

> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
> news:67e2e7b037822fc0167ad5ee76c8ac9f$1@www.eclipse.org...
>> Hi Spunk,
>>
>> Could you please walk me through? Or could you point out what I missed in
>> my following steps?
>>
>> 1) In the Report Designer, I added "MyResource_es_AR" as the Resource
>> File, noted that the Report Designer only allows me to enter one Resource
>> file. In the xml, I would see,
>> <property name="includeResource">MyResource_es_AR</property>
>>
>> 2) Copy my report (report.rptdesign) to my web viewer directory, along
>> with all my other resource files (MyResource_es_AR.properties,
>> MyResource_en_US.properties and MyResource_fr_CA.properties), and place
>> them in the same folder.
>>
>> 3) Now, on the brower, I do,
>>
http://localhost:8080/viewerEngine/frameset?__report=report. rptdesign&__locale=en_US
>>
>> My hope is that the viewer would be smart enough to retrieve all the
>> localized text from MyResource_en_US.properties instead of the
>> 'MyResource_es_AR.properties'.
>>
>> But in my test, it doesn't seem to work, it still points to the
>> 'MyResource_es_AR.properties' which is what I have used in my Report
>> Design.
>>
>>
>> Thanks,
>> Ethan
>>
>> Der Spunk wrote:
>>
>>> This works with the Viewer out of the box. Just try it.
>>
>>> Spunk
>>
>>
>>> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
>>> news:dce01449588224f2754d97b2e9c4ef9b$1@www.eclipse.org...
>>>> Hi Spunk,
>>>>
>>>> Thanks for your reply. But that's also what I did. I guess I wasn't
>>>> being clear on my questions.
>>>>
>>>> Say, I want my report to support 3 different languages (en_US, es_AR and
>>>> fr_CA) when it's being viewed.
>>>> In theory, 3 property files would be created and they are in the
>>>> location where the .rptdesign file would have access to, and when the
>>>> user uses '__locale=en_US' in the url, the viewer should be able to look
>>>> up the right 'resource_en_US.properties' to render all the labels and
>>>> static texts.
>>>> Can this be done without modifying the existing viewer code? Or do I
>>>> need to write my own code to have this supported?
>>>>
>>>> Thanks,
>>>> Ethan
>>>>
>>>> Der Spunk wrote:
>>>>
>>>>> BIRT uses a similiar mechanism to the Java resource bundles
>>>>> ( http://java.sun.com/developer/technicalArticles/Intl/Resourc eBundles/).
>>>>> When you assign a resouce file named "msg.properties" with default
>>>>> translations then you can provide further translation files in the same
>>>>> directory for other languages/locales e.g. msg_fr.properties,
>>>>> msg_ja.properties, ... To test the different locales in Report Designer
>>>>> switch to the desired language via Window > Preferences > Report Design
>>>>> > Preview. When you deploy your report design into your runtime
>>>>> environment you must also deploy your resource files.
>>>>
>>>>> Spunk
>>>>
>>>>> "Ethan T" <mackingzone@gmail.com> schrieb im Newsbeitrag
>>>>> news:661b298c57e20e65afab64aa183629a0$1@www.eclipse.org...
>>>>>> Hmm... just finished reading a very tiny section in the 'A Field Guide
>>>>>> to Reporting' on 'Localizing Text', I'm a bit confused with the
>>>>>> localization support from BIRT.
>>>>>>
>>>>>> In the Report Designer, user can only attach one resource file to the
>>>>>> given report, is that so, because the Designer is for design purpose?
>>>>>> If I were to deploy the .rptdesign to my running Tomcat with the BIRT
>>>>>> run time environment, is it impossible to support locale dynamically
>>>>>> if I don't do it programmatically?
>>>>>>
>>>>>> Any pointers are greatly appreciate,
>>>>>> Ethan
>>>>>>
>>>>
>>>>
>>
>>
Previous Topic:Designer Local JNDI
Next Topic:caching problem
Goto Forum:
  


Current Time: Sat Jul 19 05:52:50 EDT 2025

Powered by FUDForum. Page generated in 0.04594 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top