Forum Discussion
https://community.lithium.com/t5/Developers-Discussion/Get-language-setting-of-current-node/m-p/128485/highlight/true#M4902
- phani10 years agoAdvisor
Hi VarunGrazitti,
Thanks for your response.
I followed your suggestion to get the list of enabled/available community languages but in vain. It is only providing the current community selected language as you mentioned.
Regards,
Phani
- nicgutierrez10 years agoAce
Hi phani.
I'm not sure if you can get all the available languages using the API, however, there's a trick that it may be helpful for you:
If you try to set a wrong language for a user, the error message contains all the available languages... of course this is a little bit tricky since the error message could change at any point, but I though it could be interesting anyway.
Here's the API call:/vc/users/self/profiles/name/language/set?value=NOPE
Hope this helps.
Nic- phani10 years agoAdvisor
Hi nicgutierrez,
There are few challanges we are going to face with this workaround
1. We have to parse the list from a string that API returned. This string may not follow the same structure in future.
2. Currently this string contains the available languages list. In certain point of time there may be chances list may be trimmed if it is big. And also we are looking for the title of the language with language codes.
you know hardcoding the titles is not preferable option.
It would really helpfull for us if KhorosSFDC provides this information through API
Thanks,
Phani
Related Content
- 10 hours ago
- 12 months ago
- 5 months ago