cancel
Showing results for 
Search instead for 
Did you mean: 

Localization issues

Former Member
0 Kudos

Hi,

1. Is localization not supported inside script tag? For example, I want to display a localized javascript alter message inside my web page.

2. Is localization not supported in applets? For example, I want to localize the columns in the Grid applet.

Thanks,

Sara

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi.

You are right. And it would be a nice feature in the future if tags inside scripts is replaced. The input type hidden orthe parameter variant I suggest does not make the reading easier. And does not make the irpt / js files easy to read.

BR.

Poul.

Former Member
0 Kudos

The renaming of script file to irpt works because, script file does not have script tag and the script file is treated as irpt file and only irpt files are parsed.

The real problem is all elements inside script tag are parsed differently than any other HTML elements.

Thanks,

Sara

Former Member
0 Kudos

Hi.

You are right about input type hidden within the HTML code is a solution. We have found that if you have a javascript file, you need to rename it x.js.irpt and then do your replacement at the top of the file before any function calls at all. They are replaced.

var ass1 = "{##OC_Area}";

BR.

Poul.

Former Member
0 Kudos

Poul,

We have a solution for this issue. We create hidden fields for each of these localized messages to be displayed in alert messages. When we want to display a localized alert message, we get this hidden field value and display it.

But we don't like this solution of creating hidden fields for each message to be localized and shown in the alert.

Thanks,

Sara

Former Member
0 Kudos

Thanks, Poul for your response. We are using xMII 12.0 SP2. I think the current xMII code does not do the localization if there are any dynamic localizable keys inside SCRIPT tag.

Thanks,

Sara

Former Member
0 Kudos

Hi

It should be possible in version 12 within javascript. We have named xx.js.irpt and it should be working. I will ask my colleague for further details if necessary ?

BR.

Poul.

Former Member
0 Kudos

Hi,

I've also tried this some time ago (already in version 12, SP02) but I couldn't figure it out. It would be great if you could provide some additional information!

Kind regards,

Matthias

Former Member
0 Kudos

Thanks, Matthias. It works.

-Sara

Former Member
0 Kudos

Hi,

the second issue can be done by inserting the applet in the irpt page as follows:


<object … >
<param name ="ColumnHeadings" value="{##Col_1},{##Col_2},{##Col_3},...,{##Col_n}">
</object>

where Col_1 to Col_n can be translated in the localization area.

Kind Regard,

Matthias