Geolocation in bilingual countries: country vs language
By Beacon Wave Studio · · 8 min read
A shop in Montreal turns on geolocation. A visitor from Vancouver lands on the Canadian market, sees prices in dollars, and reads the page in French, because the store's Canadian market defaults to French and the redirect only knew the visitor was in Canada. Nothing in the redirect was wrong. It answered the question it was asked, which was where, and nobody asked it which language.
Country and language are two different decisions, and a lot of geolocation setups treat them as one. This article separates them: what a country redirect actually changes, how Shopify decides the language once the market is known, the cases where a country tells you nothing about the language, and how GeoBeacon handles the second decision without overriding the first.
What a market redirect changes, and what it does not
In Shopify Markets a market is a group of countries with a currency, prices, shipping and, optionally, its own domain or subfolder and its own set of published languages. When a shopper is switched to a market, they get all of that. What they get for language is the market's default, unless something further decides otherwise. Shopify's help centre describes the further step: when a customer first visits, their location is determined from their IP address and matched to a market, and the browser's language preferences are used to pick the language if that market offers more than one. The two signals are independent. IP says Canada. Accept-Language says fr-CA, or en-US, or ja.
That independence is the whole point. A country is a fact about the network the shopper is on. A language is a fact about the person. They correlate, which is why single-language countries rarely have this problem, and they diverge in exactly the places where online stores most want to get localization right.
Where the country tells you nothing about the language
- Officially multilingual countries. Canada (English and French), Belgium (Dutch, French, German), Switzerland (German, French, Italian), Luxembourg, South Africa, India. The market is obvious and the language is a coin toss without another signal.
- Regional languages inside a country. Catalan in Spain, Welsh in Wales, Basque, Frisian. Shoppers who have set their browser to these languages are telling you something a country code cannot.
- People who are not where their language is. A Polish speaker in Dublin, a Turkish speaker in Berlin, a Spanish speaker in Miami, a British expat in Lisbon. The IP is right about the market. It is wrong about the language, and Shopify's help centre itself notes that IP detection can be off for VPN and corporate network users, which is why it recommends keeping selectors visible.
- Markets that are a language, not a place. Some stores publish a French version for the whole EU market and a German one. There, the country decides nothing about the language at all; only the browser does.
How GeoBeacon separates the two decisions
A GeoBeacon rule says: shoppers detected in these countries go to this market, and optionally in this language. The country half works the way our other posts describe, and the Markets versus separate stores article covers when a market is the right target at all. The language half has three settings that matter here.
The first is the source of the suggestion. GeoBeacon's storefront script does not read the browser language itself. It calls Shopify's browsing-context suggestions endpoint, the same one the platform uses, asking for both a country and a language. Shopify answers with the country it resolved from the visit and the language it would pick from the browser's preferences. That keeps one authority for the answer, so GeoBeacon and Shopify cannot disagree about what the shopper's browser said, which is one of the ways a redirect loop starts when two scripts read different signals.
The second is a store-wide switch, on by default, called “Also switch to the detected language when it is offered by the market”. With it on, once a rule has chosen the market, GeoBeacon looks at the suggested language and, if that language is published in the destination market, switches to it in the same step. If it is not published there, the language is left alone. A Japanese-speaking visitor to a Canadian market that offers English and French gets the market's default; GeoBeacon does not send anyone to a language the store has not translated. With the switch off, the app touches only the country, and Shopify's own language behaviour applies unchanged.
The third is a fixed language on the rule. Naming a language overrides the suggestion: every shopper matched by that rule is switched to that language, if the market offers it. This is for the store that has decided its Belgian market is French-first whatever the browser says, or that sends Swiss visitors to German because that is the only Swiss translation it maintains. Language codes are ISO 639-1 with optional region tags, so fr and fr-ca are both accepted, as long as they match what you have published.
What the switch looks like to the shopper
When GeoBeacon decides on a market and a language, it submits Shopify's standard localization form with both values and the current path and query string as the return address. Shopify rewrites the URL for the new market and language, so a shopper on /products/wool-coat lands on the equivalent page in the new context, and UTM parameters survive. If the shopper is already browsing the target country in the target language, nothing happens; if only the language differs, only the language is switched. In popup mode the same decision is offered as a choice instead of applied, and the popup text can refer to the country and the target by name, though it is written by you in one language; we suggest keeping it short enough that a shopper who does not read it well still understands the two buttons.
Afterwards GeoBeacon remembers what it did for as long as you set, thirty days by default, so the shopper is not switched again on the next page or the next visit. If they then use your theme's language selector to choose something else, Shopify remembers that choice too, and both preferences hold. This is why the theme selector is not optional in a bilingual market: automatic detection gets the first visit right more often than not, and the selector is how a shopper corrects it when it is wrong.
Setting up a bilingual market
- In Shopify, publish every language you want to offer in the market. GeoBeacon can only switch to languages that exist there; check the market's languages list before writing rules.
- Decide which of the two behaviours you want. Browser-led: leave the detected-language switch on and do not set a language on the rule. Store-led: set the language on the rule. You can mix them, with a fixed language for one country and browser detection for the rest.
- Write the rule with the country or countries and the market. Use the detected-country option if the rule should send each shopper to their own country's market rather than a single one.
- Test without a VPN by forcing a country in the URL as described in our testing guide, then change your browser's language order and reload with the remembered choice cleared. You should see the market change with the country and the language change with the browser.
- Confirm a language selector is visible in the theme header or footer of the destination market, and that switching with it is respected on the next page load.
Two mistakes to avoid
The first is letting a translation app and a geolocation app both decide the language. Several translation apps offer their own browser-language redirect. If it is on and GeoBeacon's language switch is on, each may react to the other's URL. Pick one owner for language; if it is the translation app, turn GeoBeacon's detected-language switch off and it will handle countries only.
The second is inferring language from country in the rules themselves, by pointing Canada at a French-fixed rule because the store is in Quebec. That reproduces the Vancouver problem from the opening paragraph on purpose. Fix the language only where you have a business reason to, and let the browser speak for the shopper everywhere else. The rule editor on the GeoBeacon landing page shows the language field next to the market so the choice is explicit each time.
Frequently asked questions
Does a Shopify country redirect also change the language?
Not by itself. A country or market redirect changes the market, which sets currency, prices and shipping, and lands the shopper on that market's default language. If the market offers more than one language, Shopify's own localization reads the browser's language preference to pick between them. An app has to do the same explicitly, and GeoBeacon does, but only when the language is actually published in the destination market.
How does GeoBeacon know which language a shopper wants?
It asks Shopify. The storefront script calls Shopify's browsing-context suggestions endpoint, which returns the country Shopify resolved from the visit and the language it suggests from the browser's Accept-Language header. GeoBeacon never reads the browser language itself and never guesses a language from a country; a French speaker in Toronto is suggested French because their browser says so, not because Canada is bilingual.
Can I force one language for a country regardless of the browser?
Yes. A GeoBeacon rule can name a fixed language alongside the target market, for example Switzerland to the CH market in German, and that overrides the browser suggestion. If the fixed language is not published in that market, GeoBeacon switches the country only and leaves the language alone rather than sending the shopper to a URL that does not exist.
What happens when a shopper picks a different language than the one suggested?
GeoBeacon remembers the outcome of its own decision for the number of days you set, and Shopify remembers a manual choice made through a country or language selector. After either, the script stays quiet on later visits, so a shopper who switches from French to English is not switched back on the next page. Keep a language selector in your theme so the manual route always exists.