A visitor from Kyiv with a Russian-language system opens beesection.com. Which language should they see? The answer is less obvious than it seems, and ours has changed.
The order
The language of the first load is determined in this order, the same for the site, the CRM and the booking pages:
- The person's explicit choice. Switch the language in the header and it is remembered in a cookie for a year; no default overrides it.
- A visitor from Ukraine gets Ukrainian. Regardless of the browser language.
- Otherwise the browser language, if it is one of the supported ones: Ukrainian, Russian, English.
- Otherwise the default, Ukrainian.
The second step ranks above the third not for ideological reasons. The law on the state language requires that the web presence of a business serving consumers in Ukraine loads in the Ukrainian version by default. There used to be no second step, and a visitor from Kyiv with a Russian system got the Russian version on first load.
How we know the region
All traffic goes through Cloudflare, which adds a header with the visitor's country to every request. We read it on the server. The values "unknown" and "Tor" do not count as a country: then the third step applies.
In the app that loads in the browser it is too late to ask the server before the first render, so there the region is determined by the device's time zone: the "Kyiv" zone means Ukraine.
The address carries the language too
On the site the language is in the address: /uk/…, /ru/…, /en/…. An address without a language opens by the rules above, and an address with a language opens exactly that language and remembers the choice. So a link you forward to a colleague opens for them in the same language as for you.
For search engines each language version is a separate page linking to the other two, so Google shows a Ukrainian user the Ukrainian version rather than a random one.
Why not just the browser language
The browser language is the device's interface language, and it often does not match the language a person wants to read in. A phone bought with a Russian interface and never reconfigured is in half the country's pockets. The region is more reliable in that sense: a person in Ukraine almost always reads Ukrainian, and if not, they switch once and we remember.
Comments
No comments yet. Ask your question — we answer within a day.