API to get language set under servicedesk language support

Hi,
I need language to translate my app component on portal. For logged in users I am able to get the language using JS Api. But I am not sure what to do for the annonymous helpcenter.
Is there an API to fetch language language set under servicedesk language support ?

This API could have been a solution but it says apps can’t access this resource :neutral_face:

Hi @VishwajeetSingh,

Would navigator.language meet your needs (https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language)?

Regards,
Dugald

1 Like

Hi @dmorrow
Thanks. That was one solution which I thougth of as well. Just wanted to know if there’s some solution available from JSAPI or general APIs. I was intrigued by the preference API which looked really great as it takes care of detection from browser as well for annonymous users.
But for the lack of any other options I will go for the navigator.langugage.

1 Like

Hi @VishwajeetSingh,

We need to be careful about the personally identifiable information (PII) we make available to apps and locale is deemed to be indirect PII.

Regards,
Dugald

1 Like