articles

Do Not Translate -- PWA UX Design Patterns

Intend

Steer away from browser's auto prompt for translation, so the target users may save User Interaction steps.

Problem summary

Modern Web browsers may prompt the user to translate current Web page in a language not matching the default language of the browser. In some contexts, some users may find such auto prompt is disturbing. And the app designer needs to exempt the app from such browser feature.

Example

The default language of the browser is English, and the user may choose to view the localized page in Spanish, since the user is working in bilingual or multilingual contexts.

translation prompt

Browsers do provide a solution: the user may select "Never translate Spanish" or "Never translate this site". However, this requires your target users to do extra step.

prompt settings

If the PWA is wrapped in Android app and iOS app, the auto prompt for translation won't kick in.

native app

Installed PWA on Home Screen may get away from such problem, with some limitation depending on how the localized app is developed.

Install app

Usage

Chrome, Edge, and Firefox by default will popup significantly the translation offer, while Safari is slightly more passive in presentation. Though technically the users may change the browser's settings, however as the app vendor for the sake of overall UX, you may want your app to handle the situation as much as possible without requiring the users to change browser's settings.

Solution

In the Webpage, typically "index.html":

<html lang="es" translate="no">
<head>
  <meta name="google" content="notranslate">
  ...
</head>

TranslationIconGone TranslationIconGoneInInstalled

Remarks:

Rationale

PWA wrapped in Android app (via PWABuilder/TWA) wraps the PWA site in a Trusted Web Activity, which renders through Chrome but strips out all of Chrome's browser UI (address bar, menus, infobars). The translate prompt is part of that UI, so it won't appear here at all.

PWA wrapped in iOS app (via PWABuilder/TWA) wraps the PWA site in a WKWebView. Safari's translate feature is tied to Safari's own browser chrome; a WKWebView-based app doesn't get Safari's toolbar or its translate button/prompt. So this is a non-issue on iOS too.

Therefore, without applying the solution, your target users will get the desired UX.

Therefore, with the following design, you may deliver less user interactions, some of which may be wasteful, thus offer better UX.

  1. Wrapped in native Android app and iOS app.
  2. PWA installation as app.
  3. The solution suggested in this article.

Not bulletproof in all scenarios, however, statically you offer better UX.

Known Uses

Language-learning apps (Duolingo, Babbel)

These apps show target-language UI is the entire point, so auto-translation back to the user's native tongue would actively undermine the product.

Brand/regional Websites or Web apps

A company deliberately serves German UI to German-market users regardless of individual browser locale, for consistency.

Ishihara Color Blind Test

The app provides localized GUI and content, and expect many users use the localized app through a browser defaulting in English.

https://cbt.fonlow.org/ is behind the native mobile apps.

The translation offer built into modern web browsers is well documented and clearly qualifies as a UX design pattern, consistently implemented across mainstream browsers. I'd call it "Translation Offer on Language Detection." This pattern also supports an opt-out mechanism for developers who need to override the default behavior in specific contexts, which is what "Do Not Translate" (counter-pattern) is based on.

References

1. WHATWG HTML spec — lang attribute and translate attribute

2. Chrome's Translate feature documentation

3. W3C Internationalization (i18n) guidance

One honest note: the WHATWG spec and MDN pages are strong primary sources. The Chromium design doc is credible but dated (early Translate-feature architecture, not necessarily current implementation). Firefox has no equivalent public spec-level doc for this specific behavior — that's a real gap, not an oversight on my part.