4 ms·
> When I first ran into this issue back in 2017, I posted in the React issue tracker that I had ”fixed” my app by blocking translation entirely. Please do not
by rjst01 2y ago
> When I first ran into this issue back in 2017, I posted in the React issue tracker that I had ”fixed” my app by blocking translation entirely.
Please do not do this! In almost every instance I've encountered severe Translate-related broken-ness, it's still worked well enough to get me a snapshot of the current page translated. Fighting through this is still less cumbersome than the alternatives.
> The only alternative solution that I can think of, is to implement your own localization within your app (i.e. internationalization)
I will add, please make sure that language is an independent setting, and not derived from locale! I sometimes have to use translate on sites that have my preferred language available, but won't show it to me because it's tied to locale and that changes other things that I don't want, like currency.
On one such site I used a browser extension to rewrite the request for the language strings file.
- dgoldstein0 2y agoWhen you say locale, you mean your current location, e.g. as detected by geoip?
- pwagland 2y agoSometimes, but not always. Sometimes it is also based on the locales in your browser.
- pta2002 2y agoA locale is a combination of several things, including a language, but not only. E.g. I'm from portugal. I'm visiting an american site, which does not have professional portuguese translations, but does have auto-generated ones. I don't like the auto-generated ones and can read english just fine, so I want to have the language set to english (en-US in this case). However, I still want it to apply some locale-specific things from Portugal, e.g.: - Units (Metric vs. Imperial vs. Whatever mess countries like the UK do) - Date formatting (DD/MM/YYYY vs MM/DD/YYYY) - Time formatting (AM/PM vs. 24hr clock) - Currency formatting (10€ vs. 10 € vs. 10 EUR vs. €10) - Number formatting (10,000.00 vs 10.000,00) - When the week starts (Monday vs. Sunday) If you take a look at the windows locale options, it mostly lets you mix-and-match whatever you want (which is great! Now if only the MS apps let me stop using the localized keyboard shortcuts...): https://learn.microsoft.com/en-us/globalization/locale/language-settings https://learn.microsoft.com/en-us/globalization/locale/langu...
- DecoySalamander 2y agoIt means system/browser settings like the one available in navigator.language.
- rjst01 2y agoLocale I'm using as a shorthand for "the bundle of variables that your service or business needs to tweak between customers in different markets". It may determine things like currency, date/time or currency formatting, or relevant regulatory framework. My argument is that language should always be sett-able independently of the other variables locale controls. For an example of a site that almost gets it right, see https://www.finnair.com/ https://www.finnair.com/ . You are first prompted to set location, and then language. I say "almost" because although they will allow you to select English in any market, they won't allow you to select any offered language in any market. In comparison, https://www.flysas.com/ https://www.flysas.com/ you get one dropdown which sets market, currency, and language in one go.
- Freak_NL 2y ago> I will add, please make sure that language is an independent setting, and not derived from locale! Websites already have exactly what they need to provide you with the language you want via the Accept-Language header your browser sends. In your browser's settings you can configure a list of languages (country-specific if desired) which get send with every request. E.g.,: en-GB en nl (Prefer British English, fall back to any English, and if not available either use Dutch.) This is already entirely separate from your OS locale! Although it will default to filling it in with that locale's language if you don't configure it yourself of course. This should be the primary way to decide upon a language, but in addition to that offering a way to switch languages for a specific site on that site itself is a user-friendly gesture appreciated by many.
- reshlo 2y ago> In your browser's settings you can configure a list of languages (country-specific if desired) which get send with every request. Customising this list at all makes your browser fingerprint thousands of times less common than it was before you did this, and many websites you visit could then probably uniquely identify you as the same user across all of your sessions.
- Freak_NL 2y agoThat and a thousand other things. A highly privacy focussed browser could offer to enable this setting only on whitelisted websites (and send 'en' plus a bunch of random language codes on others).
- VWWHFSfQ 2y ago> 'en' plus a bunch of random language codes This is an easier fingerprint signal than just not sending anything.
- kelnos 2y agoNot if the random part of the list changes with each request. There are two ways to defeat fingerprinting: 1) make everyone look exactly the same (pretty difficult to do), or 2) introduce enough noise and randomness to fingerprinting signals to each request so that each person looks like many different people (much easier to do).
- SebastianKra 2y agoI'd have no issue leaving translation enabled, if the translator was an optional feature that the user must opt-in to, and that's clearly communicated as something not controlled by the developer. But I've received reports from Edge-users that didn't even know translation was enabled.
- rjst01 2y agoYeah, I agree that's problematic. And I would have no objection to implementing a UI feature that displayed a warning banner of some kind if it detected that the page had been translated.
- sureIy 2y ago> that changes other things that I don't want, like currency. Oh god Google is so bad at this. They don't even let me change the currency in many cases when looking at hotels (yes on the website; not in the Google Maps app)
- JimDabell 2y agoGoogle is so ridiculously bad at this, when an account that only ever uses English is explicitly asking for English search results, but happens to be located in Thailand, it will give you English results, but use the Thai calendar to display years, which is 543 years ahead of the Gregorian calendar. Are there any people at all who expect to read English text but expect to see the year 2568 instead of the year 2025, when no part of their system or account is configured for Thai?