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

Allow language and country code languages when choosing best site for visitor #1110

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

tunetheweb
Copy link
Member

To support the different Chinese languages (zh-CN and zh-TW) first check language and country code rather than just language.

Fall back to language only (zh) if needs be but most browsers are configured to have both country specific, and then generic so this fallback is unlikely to be used. My Accept-Language header for example includes British English, American English and then just English:

Accept-Language: en-GB,en-US;q=0.9,en;q=0.8

This is only used when visiting the top level site (https://almanac.httparchive.org/) so extra processing time is not a concern.

@tunetheweb tunetheweb added development Building the Almanac tech stack translation world wide web labels Jul 27, 2020
@tunetheweb tunetheweb added this to the 2020 Platform Development milestone Jul 27, 2020
@tunetheweb tunetheweb added this to TODO in 2020 via automation Jul 27, 2020
2020 automation moved this from TODO to In progress Jul 27, 2020
@tunetheweb tunetheweb merged commit a6ddc2e into main Jul 27, 2020
2020 automation moved this from In progress to Done Jul 27, 2020
@tunetheweb tunetheweb deleted the language_and_country_redirect branch July 27, 2020 18:44
@tunetheweb tunetheweb mentioned this pull request Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Building the Almanac tech stack translation world wide web
Projects
No open projects
2020
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants