Set locale based on data [message #1801629] |
Wed, 23 January 2019 21:34 |
Steve Miller Messages: 3 Registered: January 2019 |
Junior Member |
|
|
Hi,
I'm developing a compensation statement in BIRT that can contain several employees within the output. There are regulations in the EU, specifically France, that require the output in the country's language and fr_FR format for numbers. The statement already does localization, however it sets the locale for all output, not by employee. If I have a mix of employees, say US and France, I need to have the report dynamically change the locale for each employee (which are grouped-by Employee ID in the dataset). Basically, I need to set the locale for each Employee ID. I have a locale value defined in the dataset (row["localeDerived"]) and a function I modified to try to use this value but it is not working:
function getTranslation() {
if(arguments.length >0 ) {
var key = arguments[0];
var l10nParams = new Array();
for(var i=1; i < arguments.length; i++)
l10nParams.push(arguments[i]);
//return reportContext.getMessage(key, reportContext.getLocale(), l10nParams)
return reportContext.getMessage(key, row["localeDerived"], l10nParams)
}
return "";
}
Is there a way I can change the locale for each row in the dataset?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08491 seconds