Tip: Finding current Locale of HelpCenter using javascript

4 Comments

  • Andrey Sarapulov

    here is one liner for the same purpose:

    $('html').attr('lang').toLowerCase();

    3
  • Diziana

    @Andrey's solution should be used. We can trust Zendesk would always include 'lang' in their html, and that's the way to go -- instead of using hackish approach in my tip above.

     

    Thanks @Andrey.

    1
  • Jennifer Rowe
    Zendesk Documentation Team

    Thank you both, Diziana and Andrey! 

    0
  • Jake Bantz

    Good news everyone! We have added the ability to check or display the current locale being viewed by using help_center.locale as highlighted in our documentation here.

    0

Please sign in to leave a comment.

Powered by Zendesk