Forum Discussion

phani's avatar
phani
Advisor
10 years ago

API call to get List of available languages in the community

Hi,

 

Is there any API available to get list of available/enabled languages of the community?

 

Thanks,

Phani

    • phani's avatar
      phani
      Advisor

      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

      • 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