Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically Select Locale for Users #62

Open
milotype opened this issue Apr 2, 2022 · 8 comments
Open

Automatically Select Locale for Users #62

milotype opened this issue Apr 2, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@milotype
Copy link
Contributor

milotype commented Apr 2, 2022

Feature Request

Make the website automatically recognize the user's language/locale settings (browser or OS settings) and show the website in that language.

Please also consider my suggestion in issue #61. This enables the user to automatically read the website's contents in his/her langauage, but still be able to switch to another language if needed.

@danyeaw danyeaw changed the title Website translation Automatically Deploy Translation Updates Apr 2, 2022
@danyeaw danyeaw changed the title Automatically Deploy Translation Updates Automatically Select Locale for Users Apr 2, 2022
@danyeaw danyeaw added the enhancement New feature or request label Apr 2, 2022
@danyeaw
Copy link
Member

danyeaw commented Apr 10, 2023

I looked at this a bit. It looks it isn't a good practice to automatically redirect users based on language. All methods of automatically detecting a user's preferred language are flawed, and we may just end up confusing users and hurting our SEO.

We could add a warning to the page:

This page is in German but your browser is set to prefer English. An English version of this page is available if you would prefer it.
[Switch to English]

@danyeaw
Copy link
Member

danyeaw commented May 13, 2023

@milotype What do you think of the warning idea?

@milotype
Copy link
Contributor Author

@danyeaw I don't agree with the warning.

I'd still suggest (and @ovari agrees) to use the user's language/locale settings (browser or OS settings) when opening the website.

Please consider I'm not a progammer. I have basic knowledge about programming and localization of web sites and SEO. Nevertheless, IMO, automatic usage of localized/translated web pages does not confuse users nor does it hurt SEO (if appropriate metadata are used).

@danyeaw
Copy link
Member

danyeaw commented May 13, 2023

@milotype
Copy link
Contributor Author

@danyeaw @ovari
Yes Google says so. But IMO, it's just Google's recommandation.

On the other hand, when I use the following URLs in my MacOS Firefox (OS and Firefox are set to Croatian) the "Croatian" pages open automatically (independant of the search engine, Google, Bing, DuckDuckGo):
https://apps.gnome.org => https://apps.gnome.org/hr/
https://flathub.org => https://flathub.org/hr

Some sites don't even use separate "hr" URL slugs and still the "Croatian" pages appear:
https://www.gnucash.org/

As I'm not a programmer, I don't know how these sites provide automatic translated/localized pages. But it is definitely possible and I'm never confused about it. Au contraire! I'm glad not to have to switch the language in some sort of a menu for changing languages!

Nevertheless, I'd suggest to keep the "language menu", so users can change the language if they wish.

As always, it's your project, so the decision is up to you. ;-)

@danyeaw
Copy link
Member

danyeaw commented May 13, 2023

See I think the GNOME Apps experience isn't great. If I try to go to /hr, I get redirected to /en, and I have to override it with the language selector. I could see redirecting just the / URLs though.

This isn't actually supported by the i18n plugin we are using, but you could vote for it here: untra/polyglot#121

@milotype
Copy link
Contributor Author

@danyeaw
I don't know about your settings. Maybe that's why you are experiencing the situation as you describe.

I still vote for automatic localization/translation of the website in whatever way possible.

If possible implement my suggestion, otherwise leave it as is.

@ovari
Copy link
Contributor

ovari commented May 14, 2023

@danyeaw Hope the following helps in enabling auto-detection of the locale and redirection.

Firefox > Settings > General > Language > Magyar (Hungarian)

Opening the following websites, redirects and opens in the Hungarian locale:

If people go to the root website, i.e. https://gaphor.org/, please auto-direct to the locale if available, i.e. https://gaphor.org/hu/

This would provide consistency with the convention of other well-known websites.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants