Last activity: 3 Nov 2021 8:56 EDT
How to not show the pop-up of Google Translate in Chrome
Customer asks, if it is possible to not show the Google Translate in Chrome. It is possible to do so by Chrome browser settings, but with this approach all users have to do some work. In this post, I am sharing why this pops-up is displayed and how we can suppress it from server side.
- Why Google Translate pops up?
If you are in a non-English speaking country, you'll probably build an application in your native language. For example, you can build a Pega application entirely in Japanese, including splash screen. However, if Google Translate Extension is installed, a little pop-up may be displayed even though your splash screen is already localized. This is because the language settings of your Chrome browser settings and web page don't match - Your Chrome browser setting is Japanese, but Pega's splash screen includes lang="en-us" in HTML tag as below.
One way to disable it is to do so from Chrome browser settings. Turn off "Offer to translate pages that aren't in a language you read" as below. Be noted, this approach will disable Google Translate not only Pega app but any other web sites. Also, this operation has to be done per client PC, which is a lot of work.
Another approach is to change the language setting at web page. This work is done by developer once at server side, and hence there is no need to do anything at client PC. Override @baseclass.Web-Login section rule to Unauthenticated ruleset and update lang='en-us' below to lang='ja'. Also, make sure Unauthenticated ruleset is included in the Unauthenticated access group (ex. MyApp:Unauthenticated) and that has to be pointed to in the "pega" BROWSER Requestor Type.
Hope this helps.