At a 180-seat all-inclusive resort in Antalya's Lara district, every table carries the same QR code — yet a Munich family at brunch expects German, while a St. Petersburg couple at dinner expects Russian. One code, three experiences. Geo-targeting makes it possible.
IP-Based Routing With Cloudflare CF-IPCountry
Cloudflare Workers attach a CF-IPCountry header to every request — an ISO 3166-1 alpha-2 country code derived from the visitor's IP. In the Antalya scenario, the worker reads this header and 302-redirects DE → /de, RU → /ru, and TR (plus fallback) → /tr. The whole decision finishes in under 5 ms, edge-resident, with no cold start.
Storing the mapping table in KV makes both administration and A/B testing easy. If the resort gets a surge of Dutch guests in summer, management can add NL → /de fallback without redeploying; the KV update propagates worldwide in 60 seconds.
Overriding Browser Language: The Debate
The classic approach is reading the Accept-Language header — but it fails the "German-speaking Turkish citizen" edge case. A Turkish family living in Berlin for 20 years runs a German browser; in Antalya on vacation, they may still want a Turkish menu. CF-IPCountry signals location; Accept-Language signals preference.
Our recommendation: IP first, browser language as tiebreaker, but when the two signals disagree, surface a larger manual switcher. If a German-browser visitor scans at a Turkish resort, open German and put a high-contrast "Switch to Turkish" link in the header.
Manual Language Switcher as Fallback
Geo-targeting should never be forced. thMenu shows a flag-plus-language pill in the menu header, with one-tap switching across 12 languages; the choice is written to a cookie and takes precedence on subsequent scans. If a guest from Northern Cyprus wants the German menu, we don't fight them.
Edge-case statistic: over three months at the 180-seat resort, 8% of 12,400 menu scans used the manual switcher. That 8% is what keeps us GDPR-compliant — IP-based location inference falls under legitimate interest, but offering an alternative is non-negotiable.
FAQ
What language does a guest on VPN see? CF-IPCountry resolves from the exit IP — a guest tunneling through ExpressVPN's Germany server sees the German flag. The manual fallback saves the day.
What if a tourist's roaming carrier reports a foreign IP? Turkcell's international roaming IPs stay within Turkish CIDR blocks; we've had no issues. A foreign SIM scanning in Turkey gets routed to the home country's language — exactly the intended behavior.
Does this hurt SEO? No. Menu pages are noindex anyway; if Googlebot arrives from a US IP it falls through to /tr default. Public landing pages live on separate hreflang-tagged URLs.
Found this helpful? Share it.
Related articles
The Complete Guide to Running a Multilingual Restaurant Menu
Serving international guests? Learn how to set up a menu that automatically spea…
What Is a QR Code Menu? The Complete Guide for Restaurants
A QR code menu lets customers access your full restaurant menu instantly on thei…
Understanding Your Restaurant's Data: A Practical Analytics Guide
Your menu generates data every day. Learn how to read it, act on it, and use it …