Localize Dynamically

Merry Christmas and a Happy New Year to you all !

I have a localisation table for languages which is selected as a USERSETTING()

The code below works well, however, Iโ€™d like the option for users to add their own language. At the moment, this would need me to re-code each SYSTEM TEXT to include this by adding a new line of text to the SWITCH code.

SWITCH(
[Language Option],

"English", LOOKUP("English", Localise, "Language", "Share"),
"Magyar", LOOKUP("Magyar", Localise, "Language", "Share"),
"Espanyol", LOOKUP("Espanyol", Localise, "Language", "Share"),
"New Language", LOOKUP("New Language", Localise, "Language", "Share"),

"Share"

)

The table looks like thisโ€ฆ

Do any of you clever people have an answer?

Much appreciatedโ€ฆ

0 3 230
3 REPLIES 3

Instead of using SWITCH, read the value directly with LOOKUP.
LOOKUP(Usersettings(โ€œLanguageโ€),โ€œlocaliseโ€,โ€œLanguageโ€,โ€œShareโ€).

Steve
Participant V

Try this:

ANY(
  LIST(
    LOOKUP(
      USERSETTINGS("Language Option"),
      "Localise",
      "Language",
      "Share"
    ),
    "Share"
  )
  - LIST("")
)

Excellent!
Many thanks both of you!
Happy New Year to you both!

Top Labels in this Space