Home » Archived » BIRT » report design Localization
|
Re: report design Localization [message #150672 is a reply to message #150376] |
Tue, 04 April 2006 15:05 |
|
Mike,
On the general tab of the report, add the different resource files and then
on any control that uses text, select
the Localization property and add the key text. When running the report to
change the locale just specify it in the URL with
the __locale parameter.
Jason
"Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
news:e0rm3b$q9o$1@utils.eclipse.org...
> Hello, looking for a guide or comments on how to support localization of
> report designs.
>
> Thanks for any help or pointers.
>
>
|
|
| |
Re: report design Localization [message #151611 is a reply to message #151603] |
Thu, 06 April 2006 17:46 |
|
Mike,
If you add the properties file(s) in the general section of the report and
set your keys on your labels, you should be
able to set the locale in the run and render task using task.setLocale.
I will need to check on the .nl file structure.
Jason
"Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
news:e13gku$469$1@utils.eclipse.org...
> Hi Jason,
>
> our setup is as follows
>
> - Java
> - eclipse IDE
> - Client side only code (no servlets or anything)
> - BIRT API
>
> so you mentioned this __locale parameter
>
> How does this work if I'm doing everything via report engine api using
> java.
>
> say I have:
>
> jp_language.properties
> en_language.properties
> gr_language.properties
>
> and these files contain the localized strings
>
> In my report design I have the lozalized file to be used by default set to
> en_languages.properties file.
>
> now say I am running on a japanese language machine. how do I get the
> report to use the jp_language.properties file?
>
> do I assign all the language files up front into the report design, and
> then pass in a locale and the engine can figure out which file to use?
>
> or how does this work?
>
>
> Also what about .nl plug-ins that contain a set of language files. how do
> I get my report to use this sort of structure?
>
>
>
>
>
>
>
> Jason Weathersby wrote:
>> Mike,
>>
>> On the general tab of the report, add the different resource files and
>> then on any control that uses text, select
>> the Localization property and add the key text. When running the report
>> to change the locale just specify it in the URL with
>> the __locale parameter.
>>
>> Jason
>>
>> "Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
>> news:e0rm3b$q9o$1@utils.eclipse.org...
>>
>>>Hello, looking for a guide or comments on how to support localization of
>>>report designs.
>>>
>>>Thanks for any help or pointers.
>>>
>>>
>>
>>
|
|
|
Re: report design Localization [message #151628 is a reply to message #151611] |
Thu, 06 April 2006 19:35 |
Mike Boyersmith Messages: 143 Registered: July 2009 |
Senior Member |
|
|
So I tried this out :D and have had limited success.
Heres what I did,
1) I created language files for
jp_language.properties
en_language.properties
gr_language.properties
and assigned them all into my report design under general "Resource
file" section.
2) Next I created a label and assigned it to the key. (all my language
files have the same keys.)
3) saved the file. everything good so far.
4) next I preview, ok I see my english string go back change the general
tab "Resource file" property to be the french one preview and it works.
good deal so far.
5) now I deploy my report design and the .properties files
6) by using java and BIRT API, I do the following
// the task to do the work of gnereating the report
IRunAndRenderTask task = _reportEngine.createRunAndRenderTask(report);
//ULocale UL = new ULocale(ULocale.FRENCH);
task.setLocale(ULocale.ENGLISH);
....
//run the report
....
//show the report
....
and nadda the string doesn't show up. I look in output source and
nothing is there, so clearly the report engine didn't find the
properties file for english.
I must be missing something. how does one 'BIND' the language files to
the locale so the report engine knows which to grab?
Jason Weathersby wrote:
> Mike,
>
> If you add the properties file(s) in the general section of the report and
> set your keys on your labels, you should be
> able to set the locale in the run and render task using task.setLocale.
> I will need to check on the .nl file structure.
>
> Jason
>
> "Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
> news:e13gku$469$1@utils.eclipse.org...
>
>>Hi Jason,
>>
>>our setup is as follows
>>
>>- Java
>>- eclipse IDE
>>- Client side only code (no servlets or anything)
>>- BIRT API
>>
>>so you mentioned this __locale parameter
>>
>>How does this work if I'm doing everything via report engine api using
>>java.
>>
>>say I have:
>>
>>jp_language.properties
>>en_language.properties
>>gr_language.properties
>>
>>and these files contain the localized strings
>>
>>In my report design I have the lozalized file to be used by default set to
>>en_languages.properties file.
>>
>>now say I am running on a japanese language machine. how do I get the
>>report to use the jp_language.properties file?
>>
>>do I assign all the language files up front into the report design, and
>>then pass in a locale and the engine can figure out which file to use?
>>
>>or how does this work?
>>
>>
>>Also what about .nl plug-ins that contain a set of language files. how do
>>I get my report to use this sort of structure?
>>
>>
>>
>>
>>
>>
>>
>>Jason Weathersby wrote:
>>
>>>Mike,
>>>
>>>On the general tab of the report, add the different resource files and
>>>then on any control that uses text, select
>>>the Localization property and add the key text. When running the report
>>>to change the locale just specify it in the URL with
>>>the __locale parameter.
>>>
>>>Jason
>>>
>>>"Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
>>>news:e0rm3b$q9o$1@utils.eclipse.org...
>>>
>>>
>>>>Hello, looking for a guide or comments on how to support localization of
>>>>report designs.
>>>>
>>>>Thanks for any help or pointers.
>>>>
>>>>
>>>
>>>
>
|
|
|
Re: report design Localization [message #151635 is a reply to message #151628] |
Thu, 06 April 2006 19:52 |
Mike Boyersmith Messages: 143 Registered: July 2009 |
Senior Member |
|
|
So a bit more info to what I just added below. So in the report design
the .properties files are there for the languages. but by default, none
of them are selected.
If I select a particular properties file, lets use French for example
and save and run the same code, even if I say the locale is ENGLISH on
the task.setLocale(ULocale.ENGLISH); I get french.
so it looks like, what I mentioned below, that there is a piece of work
I'm missing, just setting the locale doesn't seem to select any
properties file at all.
Sorry for all the questions, new to this and just trying to figure it
all out. :D thanks for all the help
Mike Boyersmith wrote:
> So I tried this out :D and have had limited success.
>
> Heres what I did,
>
> 1) I created language files for
>
> jp_language.properties
> en_language.properties
> gr_language.properties
>
> and assigned them all into my report design under general "Resource
> file" section.
>
> 2) Next I created a label and assigned it to the key. (all my language
> files have the same keys.)
>
> 3) saved the file. everything good so far.
>
> 4) next I preview, ok I see my english string go back change the general
> tab "Resource file" property to be the french one preview and it works.
> good deal so far.
>
> 5) now I deploy my report design and the .properties files
>
> 6) by using java and BIRT API, I do the following
>
> // the task to do the work of gnereating the report
> IRunAndRenderTask task = _reportEngine.createRunAndRenderTask(report);
> //ULocale UL = new ULocale(ULocale.FRENCH);
> task.setLocale(ULocale.ENGLISH);
> ...
> //run the report
> ...
> //show the report
> ...
>
> and nadda the string doesn't show up. I look in output source and
> nothing is there, so clearly the report engine didn't find the
> properties file for english.
>
>
> I must be missing something. how does one 'BIND' the language files to
> the locale so the report engine knows which to grab?
>
>
>
>
>
>
>
> Jason Weathersby wrote:
>
>> Mike,
>>
>> If you add the properties file(s) in the general section of the report
>> and set your keys on your labels, you should be
>> able to set the locale in the run and render task using task.setLocale.
>> I will need to check on the .nl file structure.
>>
>> Jason
>>
>> "Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
>> news:e13gku$469$1@utils.eclipse.org...
>>
>>> Hi Jason,
>>>
>>> our setup is as follows
>>>
>>> - Java
>>> - eclipse IDE
>>> - Client side only code (no servlets or anything)
>>> - BIRT API
>>>
>>> so you mentioned this __locale parameter
>>>
>>> How does this work if I'm doing everything via report engine api
>>> using java.
>>>
>>> say I have:
>>>
>>> jp_language.properties
>>> en_language.properties
>>> gr_language.properties
>>>
>>> and these files contain the localized strings
>>>
>>> In my report design I have the lozalized file to be used by default
>>> set to en_languages.properties file.
>>>
>>> now say I am running on a japanese language machine. how do I get the
>>> report to use the jp_language.properties file?
>>>
>>> do I assign all the language files up front into the report design,
>>> and then pass in a locale and the engine can figure out which file to
>>> use?
>>>
>>> or how does this work?
>>>
>>>
>>> Also what about .nl plug-ins that contain a set of language files.
>>> how do I get my report to use this sort of structure?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Jason Weathersby wrote:
>>>
>>>> Mike,
>>>>
>>>> On the general tab of the report, add the different resource files
>>>> and then on any control that uses text, select
>>>> the Localization property and add the key text. When running the
>>>> report to change the locale just specify it in the URL with
>>>> the __locale parameter.
>>>>
>>>> Jason
>>>>
>>>> "Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
>>>> news:e0rm3b$q9o$1@utils.eclipse.org...
>>>>
>>>>
>>>>> Hello, looking for a guide or comments on how to support
>>>>> localization of report designs.
>>>>>
>>>>> Thanks for any help or pointers.
>>>>>
>>>>>
>>>>
>>>>
>>
|
|
|
Re: report design Localization [message #151642 is a reply to message #151635] |
Thu, 06 April 2006 20:37 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Mike,
The properties files have to be named like
name_langcode_regioncode.properties.
So if you create 2 properties files say named
mytest_en_US.properties
mytest_ja_JP.properties
If you create these in BIRT, on the general tab it will show
mytest. Set that to the default.
in the properties put something like
myText=my test text English
etc
add the key to a label, preview the report and you should get the
english version. Next change the default locale to Japanese
window->preferences->BIRT->Preview: Drop down list.
Preview and should show what you put in the ja_JP properties file.
Export all three files to a directory. Call the engine with the proper
locale and it should work.
Jason
Mike Boyersmith wrote:
> So a bit more info to what I just added below. So in the report design
> the .properties files are there for the languages. but by default, none
> of them are selected.
>
> If I select a particular properties file, lets use French for example
> and save and run the same code, even if I say the locale is ENGLISH on
> the task.setLocale(ULocale.ENGLISH); I get french.
>
> so it looks like, what I mentioned below, that there is a piece of work
> I'm missing, just setting the locale doesn't seem to select any
> properties file at all.
>
> Sorry for all the questions, new to this and just trying to figure it
> all out. :D thanks for all the help
>
>
>
>
> Mike Boyersmith wrote:
>> So I tried this out :D and have had limited success.
>>
>> Heres what I did,
>>
>> 1) I created language files for
>>
>> jp_language.properties
>> en_language.properties
>> gr_language.properties
>>
>> and assigned them all into my report design under general "Resource
>> file" section.
>>
>> 2) Next I created a label and assigned it to the key. (all my language
>> files have the same keys.)
>>
>> 3) saved the file. everything good so far.
>>
>> 4) next I preview, ok I see my english string go back change the
>> general tab "Resource file" property to be the french one preview and
>> it works.
>> good deal so far.
>>
>> 5) now I deploy my report design and the .properties files
>>
>> 6) by using java and BIRT API, I do the following
>>
>> // the task to do the work of gnereating the report
>> IRunAndRenderTask task = _reportEngine.createRunAndRenderTask(report);
>> //ULocale UL = new ULocale(ULocale.FRENCH);
>> task.setLocale(ULocale.ENGLISH);
>> ...
>> //run the report
>> ...
>> //show the report
>> ...
>>
>> and nadda the string doesn't show up. I look in output source and
>> nothing is there, so clearly the report engine didn't find the
>> properties file for english.
>>
>>
>> I must be missing something. how does one 'BIND' the language files to
>> the locale so the report engine knows which to grab?
>>
>>
>>
>>
>>
>>
>>
>> Jason Weathersby wrote:
>>
>>> Mike,
>>>
>>> If you add the properties file(s) in the general section of the
>>> report and set your keys on your labels, you should be
>>> able to set the locale in the run and render task using task.setLocale.
>>> I will need to check on the .nl file structure.
>>>
>>> Jason
>>>
>>> "Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
>>> news:e13gku$469$1@utils.eclipse.org...
>>>
>>>> Hi Jason,
>>>>
>>>> our setup is as follows
>>>>
>>>> - Java
>>>> - eclipse IDE
>>>> - Client side only code (no servlets or anything)
>>>> - BIRT API
>>>>
>>>> so you mentioned this __locale parameter
>>>>
>>>> How does this work if I'm doing everything via report engine api
>>>> using java.
>>>>
>>>> say I have:
>>>>
>>>> jp_language.properties
>>>> en_language.properties
>>>> gr_language.properties
>>>>
>>>> and these files contain the localized strings
>>>>
>>>> In my report design I have the lozalized file to be used by default
>>>> set to en_languages.properties file.
>>>>
>>>> now say I am running on a japanese language machine. how do I get
>>>> the report to use the jp_language.properties file?
>>>>
>>>> do I assign all the language files up front into the report design,
>>>> and then pass in a locale and the engine can figure out which file
>>>> to use?
>>>>
>>>> or how does this work?
>>>>
>>>>
>>>> Also what about .nl plug-ins that contain a set of language files.
>>>> how do I get my report to use this sort of structure?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Jason Weathersby wrote:
>>>>
>>>>> Mike,
>>>>>
>>>>> On the general tab of the report, add the different resource files
>>>>> and then on any control that uses text, select
>>>>> the Localization property and add the key text. When running the
>>>>> report to change the locale just specify it in the URL with
>>>>> the __locale parameter.
>>>>>
>>>>> Jason
>>>>>
>>>>> "Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
>>>>> news:e0rm3b$q9o$1@utils.eclipse.org...
>>>>>
>>>>>
>>>>>> Hello, looking for a guide or comments on how to support
>>>>>> localization of report designs.
>>>>>>
>>>>>> Thanks for any help or pointers.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
|
|
|
Re: report design Localization [message #152059 is a reply to message #151642] |
Fri, 07 April 2006 21:57 |
Mike Boyersmith Messages: 143 Registered: July 2009 |
Senior Member |
|
|
ok this clears this up, Thank you for your help Jason and have a good
weekend.
- Mike
Jason Weathersby wrote:
> Mike,
>
> The properties files have to be named like
> name_langcode_regioncode.properties.
>
> So if you create 2 properties files say named
>
> mytest_en_US.properties
> mytest_ja_JP.properties
>
> If you create these in BIRT, on the general tab it will show
> mytest. Set that to the default.
>
> in the properties put something like
> myText=my test text English
> etc
>
> add the key to a label, preview the report and you should get the
> english version. Next change the default locale to Japanese
> window->preferences->BIRT->Preview: Drop down list.
> Preview and should show what you put in the ja_JP properties file.
>
> Export all three files to a directory. Call the engine with the proper
> locale and it should work.
>
> Jason
>
>
> Mike Boyersmith wrote:
>
>> So a bit more info to what I just added below. So in the report design
>> the .properties files are there for the languages. but by default,
>> none of them are selected.
>>
>> If I select a particular properties file, lets use French for example
>> and save and run the same code, even if I say the locale is ENGLISH on
>> the task.setLocale(ULocale.ENGLISH); I get french.
>>
>> so it looks like, what I mentioned below, that there is a piece of
>> work I'm missing, just setting the locale doesn't seem to select any
>> properties file at all.
>>
>> Sorry for all the questions, new to this and just trying to figure it
>> all out. :D thanks for all the help
>>
>>
>>
>>
>> Mike Boyersmith wrote:
>>
>>> So I tried this out :D and have had limited success.
>>>
>>> Heres what I did,
>>>
>>> 1) I created language files for
>>>
>>> jp_language.properties
>>> en_language.properties
>>> gr_language.properties
>>>
>>> and assigned them all into my report design under general "Resource
>>> file" section.
>>>
>>> 2) Next I created a label and assigned it to the key. (all my
>>> language files have the same keys.)
>>>
>>> 3) saved the file. everything good so far.
>>>
>>> 4) next I preview, ok I see my english string go back change the
>>> general tab "Resource file" property to be the french one preview and
>>> it works.
>>> good deal so far.
>>>
>>> 5) now I deploy my report design and the .properties files
>>>
>>> 6) by using java and BIRT API, I do the following
>>>
>>> // the task to do the work of gnereating the report
>>> IRunAndRenderTask task = _reportEngine.createRunAndRenderTask(report);
>>> //ULocale UL = new ULocale(ULocale.FRENCH);
>>> task.setLocale(ULocale.ENGLISH);
>>> ...
>>> //run the report
>>> ...
>>> //show the report
>>> ...
>>>
>>> and nadda the string doesn't show up. I look in output source and
>>> nothing is there, so clearly the report engine didn't find the
>>> properties file for english.
>>>
>>>
>>> I must be missing something. how does one 'BIND' the language files
>>> to the locale so the report engine knows which to grab?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Jason Weathersby wrote:
>>>
>>>> Mike,
>>>>
>>>> If you add the properties file(s) in the general section of the
>>>> report and set your keys on your labels, you should be
>>>> able to set the locale in the run and render task using task.setLocale.
>>>> I will need to check on the .nl file structure.
>>>>
>>>> Jason
>>>>
>>>> "Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
>>>> news:e13gku$469$1@utils.eclipse.org...
>>>>
>>>>> Hi Jason,
>>>>>
>>>>> our setup is as follows
>>>>>
>>>>> - Java
>>>>> - eclipse IDE
>>>>> - Client side only code (no servlets or anything)
>>>>> - BIRT API
>>>>>
>>>>> so you mentioned this __locale parameter
>>>>>
>>>>> How does this work if I'm doing everything via report engine api
>>>>> using java.
>>>>>
>>>>> say I have:
>>>>>
>>>>> jp_language.properties
>>>>> en_language.properties
>>>>> gr_language.properties
>>>>>
>>>>> and these files contain the localized strings
>>>>>
>>>>> In my report design I have the lozalized file to be used by default
>>>>> set to en_languages.properties file.
>>>>>
>>>>> now say I am running on a japanese language machine. how do I get
>>>>> the report to use the jp_language.properties file?
>>>>>
>>>>> do I assign all the language files up front into the report design,
>>>>> and then pass in a locale and the engine can figure out which file
>>>>> to use?
>>>>>
>>>>> or how does this work?
>>>>>
>>>>>
>>>>> Also what about .nl plug-ins that contain a set of language files.
>>>>> how do I get my report to use this sort of structure?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Jason Weathersby wrote:
>>>>>
>>>>>> Mike,
>>>>>>
>>>>>> On the general tab of the report, add the different resource files
>>>>>> and then on any control that uses text, select
>>>>>> the Localization property and add the key text. When running the
>>>>>> report to change the locale just specify it in the URL with
>>>>>> the __locale parameter.
>>>>>>
>>>>>> Jason
>>>>>>
>>>>>> "Mike Boyersmith" <mjboyers@us.ibm.com> wrote in message
>>>>>> news:e0rm3b$q9o$1@utils.eclipse.org...
>>>>>>
>>>>>>
>>>>>>> Hello, looking for a guide or comments on how to support
>>>>>>> localization of report designs.
>>>>>>>
>>>>>>> Thanks for any help or pointers.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>
|
|
|
Goto Forum:
Current Time: Sat Nov 09 00:57:26 GMT 2024
Powered by FUDForum. Page generated in 0.04108 seconds
|