How to Add German, French, and Dutch to Your Shopify Store with Proper Hreflang
Expanding your Shopify store into European markets is one of the highest-leverage growth moves you can make. But simply running text through Google Translate won't cut it. You need properly localized product pages, correct hreflang tags, and SEO-friendly URLs so search engines serve the right language to the right audience.
This tutorial shows you how to add German, French, and Dutch to your Shopify store using SiteLocaleAI — a self-hosted JavaScript library that translates your storefront with LLMs, localizes prices, and pre-renders translated pages for search engines.
Why hreflang matters for Shopify multilingual SEO
Hreflang tells Google which language and regional version of a page to show in search results. Without it, you risk:
- Duplicate content penalties across language versions
- Wrong-language pages ranking in local searches
- Lost traffic to competitors with proper localization
Shopify's native Markets feature handles some of this, but it doesn't generate translated meta tags, product descriptions, or collection pages at scale. That's where SiteLocaleAI comes in.
Step 1: Install SiteLocaleAI on your Shopify theme
SiteLocaleAI is framework-agnostic, so it works with any Shopify theme (Liquid, Hydrogen, or headless). Add the script before the closing </head> tag in your theme.liquid file:
<script
src="https://cdn.yourdomain.com/sitelocale.min.js"
data-api-key="YOUR_LLM_API_KEY"
data-locales="de,fr,nl"
data-default-locale="en"
defer
></script>
Since SiteLocaleAI is self-hosted, you bring your own LLM API key (Claude, GPT-4o-mini, etc.). This keeps costs low and data private.
Step 2: Configure locale routing
Set up URL structure for each language. SiteLocaleAI supports subdirectories (/de/, /fr/, /nl/) or subdomains. Subdirectories are easier for Shopify and generally preferred for SEO.
window.SiteLocale.init({
locales: ['en', 'de', 'fr', 'nl'],
defaultLocale: 'en',
routing: 'subdirectory',
currencyMap: {
de: 'EUR',
fr: 'EUR',
nl: 'EUR'
}
});
Step 3: Translate product pages dynamically
SiteLocaleAI intercepts text nodes and translates them on the fly using your LLM. For product pages, you'll want to translate:
- Product titles and descriptions
- Variant names
- Collection names
- Meta titles and descriptions
- Schema.org structured data
Add the data-sitelocale attribute to any element you want translated:
<h1 data-sitelocale>{{ product.title }}</h1>
<div data-sitelocale>{{ product.description }}</div>
<meta property="og:title" data-sitelocale content="{{ product.title }}">
SiteLocaleAI caches translations per locale, so repeat visitors get instant loads.
Step 4: Localize prices with psychological rounding
European shoppers expect prices like €19,99 — not €20.34. SiteLocaleAI automatically converts and rounds prices per currency using psychological pricing rules:
SiteLocale.localizePrice(29.99, 'EUR');
// Returns "29,99 €"
SiteLocale.localizePrice(29.99, 'EUR', { roundTo: 0.99 });
// Returns "29,99 €"
This applies to product pages, cart, and checkout messaging.
Step 5: Add hreflang tags
SiteLocaleAI can inject hreflang tags automatically. Add this to your theme.liquid head section:
{% if sitelocale_hreflang %}
{{ sitelocale_hreflang }}
{% endif %}
Or generate them manually in your theme:
<link rel="alternate" hreflang="en" href="https://yourstore.com/products/widget" />
<link rel="alternate" hreflang="de" href="https://yourstore.com/de/products/widget" />
<link rel="alternate" hreflang="fr" href="https://yourstore.com/fr/products/widget" />
<link rel="alternate" hreflang="nl" href="https://yourstore.com/nl/products/widget" />
<link rel="alternate" hreflang="x-default" href="https://yourstore.com/products/widget" />
Always include an x-default pointing to your primary language version.
Step 6: Pre-render translated pages for SEO
This is the secret weapon. Most JS-based translation tools fail SEO because search engines see only the original language. SiteLocaleAI includes a CLI that pre-renders fully translated HTML for each locale:
npx sitelocale prerender \
--url https://yourstore.com \
--locales de,fr,nl \
--output ./dist \
--sitemap ./dist/sitemap.xml
This generates static German, French, and Dutch versions of every product, collection, and page. Upload them to your Shopify store via a reverse proxy or use Shopify's Hydrogen for headless deployments. Search engines now index fully translated pages.
You can also generate a multilingual sitemap:
npx sitelocale sitemap --locales de,fr,nl --output ./dist/sitemap.xml
Step 7: Test and monitor
After deployment:
- Use Google Search Console's International Targeting report to verify hreflang.
- Run
curl -H "Accept-Language: de" https://yourstore.com/to test language detection. - Check that
x-defaultresolves correctly. - Monitor crawl stats for
/de/,/fr/, and/nl/in Search Console.
For more details, see the SiteLocaleAI documentation on hreflang and SEO pre-rendering.
Wrapping up
Adding German, French, and Dutch to your Shopify store doesn't require a full replatform. With SiteLocaleAI, you get:
- Drop-in JS library that works with any Shopify theme
- Self-hosted translation using your own LLM API keys
- Automatic hreflang and price localization
- CLI pre-rendering for full SEO indexability
Ready to grow your European traffic? Try SiteLocaleAI today and launch your multilingual Shopify store in hours, not weeks.