Skip to main content

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? 


Thanks!



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).


Regards,

Radheshyam




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 %}
</p>


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?


Thanks!


Michel




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.


Regards,

Karthick




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?


Thanks!


Michel




Michel,


we have the same problem. I've added a feature request for this: https://support.freshservice.com/support/discussions/topics/308276





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?

 

Thanks!

 

Michel

Do you have an example io can look at and ill help figure it out for you.


@dortez88 @mren

With the recent upgrade to Freshworks organisation, the login page for Freshservice would be redirected to the Freshworks Neo center and in the subsequent login page, users would be having the ability to choose the language in which the page needs to be displayed

Would this be helpful for you which would help users to view the page in different languages as per their preference.

Thanks.


Ya thats what we used until we started google workspace and we run the authentication and one login based off google sites portal.

But we had a guy who used to work with us who advised advice for mrenaud so it would help them. He advised to enable the settings and said that should help again im not 100% for i stepped into his postion when he left. I how it helps or if some one knows its wrong please let me know. 

Open a Browser and enter in the URL
 

chrome://flags/

Then look fo rbelow settings and enable.

Experimental accessibility language detection

Enable language detection for in-page content which is then exposed to assistive technologies such as screen readers. – Mac, Windows, Linux, Chrome OS, Android, Fuchsia

&
Experimental accessibility language detection for dynamic content

Enable language detection for dynamic content which is then exposed to assistive technologies such as screen readers. – Mac, Windows, Linux, Chrome OS, Android, Fuchsia


Reply