Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » how to make birt supprt i18n in osgi application
how to make birt supprt i18n in osgi application [message #640445] Mon, 22 November 2010 07:36 Go to next message
No real name is currently offline No real name
Messages: 6
Registered: November 2010
Junior Member
Hi,i use birt in an osgi application. Each report template and relative resource file(for i18n) are packaged as bundle jar,we can call them as template bundle
when i render the report ,i set the locale to the renderoption, however,there seem to be no effect.
i guess that the classloader for rendering can't see the resources in the template bundle.
Is it right? how can i make it render rightly, or how can i make it support i18n in osgi application.thanks!
Re: how to make birt supprt i18n in osgi application [message #640657 is a reply to message #640445] Mon, 22 November 2010 17:29 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Are you using the viewer plugin or the report engine plugin?
Are you adding the resource properties files to the report using the
Resources tab of the property editor?

Jason

On 11/22/2010 2:37 AM, ice_stream@163.com wrote:
> Hi,i use birt in an osgi application. Each report template and relative
> resource file(for i18n) are packaged as bundle jar,we can call them as
> template bundle
> when i render the report ,i set the locale to the renderoption,
> however,there seem to be no effect.
> i guess that the classloader for rendering can't see the resources in
> the template bundle.
> Is it right? how can i make it render rightly, or how can i make it
> support i18n in osgi application.thanks!
>
Re: how to make birt supprt i18n in osgi application [message #640757 is a reply to message #640657] Tue, 23 November 2010 03:43 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 6
Registered: November 2010
Junior Member
yes,i develop the report template in the birt designer and do a preview by the view plugins,all seem to be ok.
At runtime,i write my code for rending and representing the rende result.
But ,if i package the report into a jar ,as a bundle,the mssage resource files can't be found by the report engine.
I review the birt source code,and the view plugins's source code,and find two solutions: write a classloader or write implement for org.eclipse.birt.report.model.api.IResourceLocator ,i just want to know ,is there any better way to let the resource file be found in this scene-report template are packaged as a bundle.
by the way ,the version i use is 2.3.2.

Re: how to make birt supprt i18n in osgi application [message #640945 is a reply to message #640757] Tue, 23 November 2010 15:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I am still a bit confused. Are you setting the resource folder in your
code to a hard location?

Jason

On 11/22/2010 10:43 PM, ice_stream@163.com wrote:
> yes,i develop the report template in the birt designer and do a preview
> by the view plugins,all seem to be ok.
> At runtime,i write my code for rending and representing the rende result.
> But ,if i package the report into a jar ,as a bundle,the mssage resource
> files can't be found by the report engine.
> I review the birt source code,and the view plugins's source code,and
> find two solutions: write a classloader or write implement for
> org.eclipse.birt.report.model.api.IResourceLocator ,i just want to know
> ,is there any better way to let the resource file be found in this
> scene-report template are packaged as a bundle.
> by the way ,the version i use is 2.3.2.
>
>
Re: how to make birt supprt i18n in osgi application [message #641090 is a reply to message #640945] Wed, 24 November 2010 08:59 Go to previous message
No real name is currently offline No real name
Messages: 6
Registered: November 2010
Junior Member
yes,i did.
i solve this question by writing an implement of the org.eclipse.birt.report.model.api.IResourceLocator ,and the class will goto the special place to load message resources.
When the method named openReportDesign in reportEngine is invoked,the resourceLocator is assigned as a parameter.
Previous Topic:Exception exporting to excel when report has just one column
Next Topic:Change locale via report-parameter
Goto Forum:
  


Current Time: Fri Sep 19 21:58:07 GMT 2014

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

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