Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Problem : localizing message with parameters
Problem : localizing message with parameters [message #512975] Mon, 08 February 2010 13:35 Go to next message
youss  is currently offline youss Friend
Messages: 2
Registered: February 2010
Junior Member
Hi everyone,

I am just discovering Birt 2.5.1 since one week, and I have a little problem with the internationalization of my reports.

I want to use localized messages with parameters, as described on here.

Here is my key in the resource file:

message.line1=I have seen {0} {1} {2} {3}.


And how I use it (in a dynamic text) :

i18nParams = new Array(4);
i18nParams[0] = params["value0"].value;
i18nParams[1] = params["value1"].value;
i18nParams[2] = params["value2"].value;
i18nParams[3] = params["value3"].value;
	this.text = reportContext.getMessage("message.line1", reportContext.getLocale(), i18nParams);


When I render the design, I always get this text : "I have seen {0} {1} {2} {3}"
All the values have not been replaced...

What I am doing wrong ?

Thanks.

[Updated on: Mon, 08 February 2010 13:43]

Report message to a moderator

Re: Problem : localizing message with parameters [message #513011 is a reply to message #512975] Mon, 08 February 2010 15:17 Go to previous message
youss  is currently offline youss Friend
Messages: 2
Registered: February 2010
Junior Member
Problem solved :

There was a quote in my message like message.line=It's the {0}.

Doubling the quote solved my problem.

So, the good syntax is message.line=It''s the {0}.

Thanks everyone.

[Updated on: Mon, 08 February 2010 17:07]

Report message to a moderator

Previous Topic:[Tribix 2.5.1] xls is lock, can't release.
Next Topic:Birt Viewer, DataSource, Password
Goto Forum:
  


Current Time: Fri Mar 29 07:54:10 GMT 2024

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

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

Back to the top