Snippets with Localisation

Hi all,

When creating snippets, how do I make it so that it can also support different localisation, like it would follow UX’s user preference?

Regards

Tat

Hi Tat,

It would help if you could be a litle more specific. What’s the snippet for and what exactly are you wanting to reference?

Hi Scott,

Using the demo environment as example, something like this, the highlighted could be in different language when I switch to that language.

Regards

Tat

Hi Tat,

If the values are attributes coming from TM1 then theres 2 ways.

  1. OData request specifying local in the header. Response from server shoudl return localized value
  2. Direct request to the }LocalizedElementAttributes cube passing in the locale as argument (more risky since no fallback to default non-localized value if localized value is empty)

If the values are refering to any object caption from the application object tree (app name, folder name, page name, widget name, etc.) then I assume it works in a similar way to OData query and the localized name will be automatically returned based on the locale referenced in the header but I will check with a developer and get back to you.