Replies: 1 comment
|
While that makes sense, notice that index.html is a starting point and I would recommend you change it to fit your needs. The code is in the generated js files. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Motivation
The browser sometimes offers to translate my web app, particularly in Google Chrome. I am developing a multilingual app that will detect the user's language and provide its own language selector. I would like the app to manage its own translations without an additional browser translation prompt.
I have now verified that Google Translate can break the web app, depending on how it is used:
Proposed behavior
Please include this tag by default in the generated JavaScript port's
index.html:Chromium documents this opt-out. Also consider setting
translate="no"on the root<html>element, using the standard HTML translation attribute.A build hint would let developers choose the policy. For example, a new proposed hint named
javascript.allowBrowserTranslationcould work as follows:false(default): emit the meta tag andtranslate="no".true: omit those opt-out markers and let the browser offer translation according to its normal settings and language detection.All reactions