Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

How can I change locale dinamically by script?

Avatar

Former Community Member

Hi everybody!

I need a piece of code like this:

var land = *some_kind_of_input*;

switch (land) {
  case "GB":
    xfa.localeSet.name = "en_GB";
    break;
  case "US":
    xfa.localeSet.name = "en_US";
    break;
  default:
    xfa.localeSet.name = "it_IT";
    break;
}

but this isn't working :-(

i think that xfa.localeSet.name = "en_US" isn't the right way to change locale... any other idea?

the fact is that some numeric fields display grouping and decimal separated in the wrong way.

thanks in advance

1 Reply