Overview
When a Shopify merchant decided to tap into the German, French, and Dutch markets, the biggest challenge was providing fully translated product pages that search engines could index. Traditional translation apps either relied on static CSV imports or server‑side rendering, which made it hard to keep content fresh and added latency. SiteLocaleAI’s self‑hosted JavaScript library solved both problems in one drop‑in solution.
Why SiteLocaleAI?
- Framework‑agnostic – works with any Shopify theme, no Node.js required.
- Self‑hosted – you bring your own LLM API key (Claude, GPT‑4o‑mini, etc.), keeping data private and costs predictable.
- Price localization – automatic psychological rounding per currency (e.g., €19.99 → €20).
- SEO‑ready – CLI pre‑renders translated pages for crawlers and injects correct
hreflangtags.
Implementation Steps
1. Install the library
Add the minified script to your theme’s layout/theme.liquid just before the closing </head> tag:
<script src="https://cdn.sitelocaleai.com/v1/site-locale.min.js"></script>
<script>
SiteLocaleAI.init({
apiKey: 'YOUR_LLM_API_KEY',
defaultLang: 'en',
supportedLangs: ['de', 'fr', 'nl'],
priceRounding: true
});
</script>
2. Translate product data on the client
In a product template (templates/product.liquid) replace static text with the library’s t() helper:
<h1>{{ product.title | t }}</h1>
<p>{{ product.description | t }}</p>
<span class="price">{{ product.price | money | t }}</span>
The t filter sends the string to your LLM, receives the translation, and caches it in localStorage for subsequent visits.
3. Generate hreflang tags
SiteLocaleAI automatically creates the correct <link rel="alternate" hreflang="…"> tags for every supported language. Insert the following snippet in layout/theme.liquid:
{{ site_locale_ai_hreflang_tags }}
The output looks like:
<link rel="alternate" hreflang="de" href="https://example.com/de/products/awesome-shirt">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/products/awesome-shirt">
<link rel="alternate" hreflang="nl" href="https://example.com/nl/products/awesome-shirt">
<link rel="alternate" hreflang="x-default" href="https://example.com/products/awesome-shirt">
4. Pre‑render for SEO
Run the CLI on your build server to generate static HTML for each language:
npx site-locale-cli prerender \
--url https://example.com/products/awesome-shirt \
--langs de,fr,nl \
--output ./prerendered
The generated files are then uploaded to Shopify’s static asset storage, ensuring Googlebot sees fully translated content without JavaScript execution.
Results
| Metric | Before | After 3 months |
|---|---|---|
| Organic sessions (EU) | 12,400 | 17,600 (+42%) |
| Conversion rate (EU) | 2.1% | 2.7% (+27%) |
| Avg. order value (EUR) | €45.00 | €46.80 (+4%) |
| Bounce rate | 58% | 46% (-12 points) |
The uplift came from two sources:
- Better crawlability – search engines now index a separate URL for each language, capturing long‑tail queries like “Kaufen rotes T‑Shirt”.
- Localized pricing – psychological rounding increased perceived value and reduced cart abandonment.
Cost Breakdown
The merchant chose the Growth plan at $99/month, which includes:
- Unlimited translations
- CLI access
- Priority support
At $99/month, the incremental revenue from the 42% traffic lift (≈ $8,400 in additional sales) dwarfs the subscription cost, delivering an ROI of ~85× in the first quarter.
Lessons Learned
- Cache aggressively – storing translations in
localStorageand CDN edge caches cut API calls by ~70%. - Use the CLI for critical landing pages – product listings can stay dynamic, but category pages benefit from static pre‑rendering.
- Monitor hreflang correctness – Google Search Console flagged a missing
x-defaulttag initially; fixing it added another 5% traffic bump.
Next Steps
If you run a Shopify store and want to replicate these results, start with the free Indie plan to test a single language, then scale to Growth or Enterprise as you add more markets.
For detailed integration notes, see the SiteLocaleAI documentation and the Shopify guide.
Ready to go global? Try SiteLocaleAI today and watch your international SEO soar.