Freshworks named the only Challenger in 2021 Gartner® Magic Quadrant™ for ITSM tools. Access Report

Start a new topic

How could we display the login page in the language of the user's browser (or system)

Is there a way to display the login page in the end user's web browser or system language? 

Once the user is logged in, we have access to dynamic  placeholders like portal.user.language and is therefore easy to case on language to display the layout elements in the language defined in the end user's profile. 

However, before the end user is logged in, the user context does not exist and the page is in the primary language defined in the Portal's configuration... Is it possible to somehow fetch the end user browser's (or system) language and display the login page in that language? 


1 person has this problem

Hi Michel,

The end user browser's language can be detected by using JS in the portal pages and can be translated using Google's Translate API (will be charged by Google).



I know I can get the browser's language using a Javascript, but I do not know how I can pass that language value back to the HTML layout or to Liquid... When I look at the Login page code, there are multiple liquid translate functions, how do they work? Example:

<p class="info-text">
{% translate signup_help_information %}

We need to display at least the Login page in our users' language... I tried accessing our Customer Portal's page using a french OS and browser but the page is still displayed in English. Google translation gives some very strange results, at times... Is there a way we can change the displayed text based on browser's language or using some undocumented liquid functions?



Hi Michael,

{% translate signup_help_information %} will just translate predefined data based on the account language. "translate" method will not translate dynamically. Only way is to translate desired data using third party API.



If I undestand you correctly, your translate function is useless on the login page because until someone logs in, you have no idea which account is attempting to log... Did I miss something? Could  you not just use the browser's language in your translate function whenever the account is "null" or something? I know that Liquid allows internationalization using JSON files for each supported culture codes, so that should be feasible. Like once you are logged in, how do you display the portal in the contact's language? Same could apply here except that the source for determining the language would be the browser's language rather thant the contact language.

This might seem like a minor issue to you, but for an international support portal it makes a big difference.

If I was to use a third party API how would that be done?




we have the same problem. I've added a feature request for this:

Login or Signup to post a comment