Set localization based on value in dataset

Max Bo
edited February 11, 2022 in Analytics #1

Hi,
I have a report that is creating a shipping document. Based on the value of the postal area I want to define whether the literals on the document should be in English or French. The idea is to use the localization parameter file for en_US and fr and somehow define when to use what language file (maybe via JavaScript?)

Any ideas how to achieve this?

Max

Warning No formatter is installed for the format ipb

Answers

  • Nobody an idea?

    Warning No formatter is installed for the format ipb
  • jfranken
    edited June 19, 2018 #3

    I don't know how to do what you are asking, but I have a couple of ideas. First, if it is just two languages, it might be easier to ignore the locale files and do it all in JavaScript. You are going to need to create key-value pairs for each label for each language even if you use localization. For two languages it doesn't buy you much. You could put the code in a JavaScript resource file so that it is easy to maintain.

    For the second idea, I know you can get the locale from this code:

    reportContext.getAppContext().toString();

    I don't know how to change the locale, but maybe you can take a look at it and see if there is a way. If you have the ability to open a support ticket, I suggest opening one for this issue.

    Warning No formatter is installed for the format ipb