Translate Your Shopify Store
Translate your Shopify store's products, collections, pages, and theme content using Langbly's translation API. This guide covers multiple approaches, from manual scripting to automated workflows.
Overview​
Shopify supports multilingual stores through its Markets feature and the Translate & Adapt app. You can use Langbly to power the actual translations, either through direct API calls or through automation tools like Zapier and n8n.
Approach 1: Shopify + n8n + Langbly (Recommended)​
The most flexible approach uses n8n (open-source workflow automation) to orchestrate translations between Shopify and Langbly.
Setup​
- Install n8n (self-hosted or cloud)
- Install the n8n-nodes-langbly community node
- Get your Langbly API key (sign up free)
- Connect your Shopify store to n8n using the Shopify node
Workflow: Translate New Products​
Shopify Trigger (new product) →
Langbly (translate title to NL) →
Langbly (translate description to NL) →
Shopify (update product translation via GraphQL)
n8n Workflow Steps​
- Shopify Trigger: Watch for new/updated products
- Langbly Node: Translate
titleto target language - Langbly Node: Translate
body_htmlwithformat: htmlto preserve formatting - Shopify Node: Update translations via the Translations API
Shopify GraphQL for Translations​
Shopify's translation system uses GraphQL mutations. Here's how to register a translation:
mutation translationsRegister($resourceId: ID!, $translations: [TranslationInput!]!) {
translationsRegister(resourceId: $resourceId, translations: $translations) {
translations {
key
value
locale
}
userErrors {
field
message
}
}
}
Variables:
{
"resourceId": "gid://shopify/Product/12345",
"translations": [
{
"key": "title",
"value": "Vertaalde producttitel",
"locale": "nl",
"translatableContentDigest": "..."
},
{
"key": "body_html",
"value": "<p>Vertaalde productomschrijving</p>",
"locale": "nl",
"translatableContentDigest": "..."
}
]
}
Approach 2: Shopify + Zapier + Langbly​
If you prefer Zapier over n8n:
- Install the Langbly Zapier app (search "Langbly" in Zapier)
- Create a Zap:
- Trigger: Shopify → New Product
- Action 1: Langbly → Translate Text (title → target language)
- Action 2: Langbly → Translate HTML (body_html → target language)
- Action 3: Shopify → Custom Request (GraphQL mutation to register translations)
Approach 3: Custom Script (Node.js)​
For full control, use a Node.js script with the Langbly and Shopify SDKs:
import { Langbly } from 'langbly';
import Shopify from '@shopify/shopify-api';
const langbly = new Langbly({ apiKey: 'your-langbly-key' });
// Translate a product
async function translateProduct(productId, targetLocale) {
// 1. Fetch product from Shopify
const product = await shopify.rest.Product.find({ id: productId });
// 2. Translate title (plain text)
const titleResult = await langbly.translate({
q: product.title,
target: targetLocale,
source: 'en',
});
// 3. Translate description (HTML)
const descResult = await langbly.translate({
q: product.body_html,
target: targetLocale,
source: 'en',
format: 'html',
});
// 4. Register translations via Shopify GraphQL
// (use translatableResources query to get digests first)
console.log(`Translated "${product.title}" → "${titleResult.translatedText}"`);
}
// Translate all products to Dutch
const products = await shopify.rest.Product.all();
for (const product of products.data) {
await translateProduct(product.id, 'nl');
}
Approach 4: Bulk Translation Script​
For stores with many products, use batch translation:
import { Langbly } from 'langbly';
const langbly = new Langbly({ apiKey: 'your-langbly-key' });
// Translate multiple texts in one API call
const titles = ['Running Shoes', 'Winter Jacket', 'Leather Bag'];
const result = await langbly.translate({
q: titles, // Array of texts
target: 'nl',
source: 'en',
});
// result.data.translations = [
// { translatedText: 'Hardloopschoenen' },
// { translatedText: 'Winterjas' },
// { translatedText: 'Leren tas' },
// ]
What to Translate​
| Content Type | API Format | Notes |
|---|---|---|
| Product titles | text | Plain text translation |
| Product descriptions | html | Preserves HTML formatting |
| Collection titles | text | Short, keep brand names consistent |
| Collection descriptions | html | May contain rich text |
| Page content | html | Blog posts, About pages, etc. |
| Metafield values | text or html | Depends on metafield type |
| Navigation menus | text | Short UI strings |
| Email notifications | html | Order confirmations, shipping updates |
Shopify Markets Setup​
Before translating, enable multilingual support in Shopify:
- Go to Settings → Markets
- Add your target markets (e.g., Netherlands, Germany)
- For each market, add the target language
- Install Translate & Adapt app (free, by Shopify)
- Now you can register translations via the API
Glossary for E-commerce​
Use Langbly's glossary feature to keep product-specific terms consistent:
{
"q": "Check out our Premium Leather Collection",
"target": "nl",
"glossary": [
{ "source": "Premium Leather Collection", "target": "Premium Leren Collectie" },
{ "source": "Check out", "target": "Bekijk" }
]
}
Common glossary entries for e-commerce:
- Brand names (keep untranslated or use specific localization)
- Product line names
- Size labels (S, M, L, XL, usually kept as-is)
- Material names (if you have specific terminology)
Cost Comparison​
| Solution | Cost for 100K products (avg 500 chars each) |
|---|---|
| Manual translation | $5,000 - $50,000+ |
| Shopify Translate & Adapt (Google) | ~$1,000 |
| Weglot | $490/mo (ongoing) |
| Langbly | ~$100 (one-time) + $19/mo for updates |
Calculation: 100K products × 500 chars = 50M characters. Langbly Growth plan ($69/mo) includes 25M chars, so ~2 months of translation at $138 total. New/updated products ongoing at Starter ($19/mo).
SEO Considerations​
- hreflang tags: Shopify Markets handles these automatically
- Translated URLs: Use Shopify's URL localization feature
- Meta descriptions: Translate these too, since they affect click-through rates
- Alt text: Don't forget image alt text for accessibility and SEO
Troubleshooting​
Products not showing translated​
- Check that the market/language is active in Shopify Settings → Markets
- Verify translations were registered via GraphQL (check for
userErrors) - Clear Shopify's cache or check in an incognito window
HTML formatting broken​
- Make sure you're using
format: "html"for body_html fields - Langbly preserves HTML tags, so if tags are breaking, check the original HTML
Rate limits​
- Shopify has API rate limits (2 requests/second for REST, 50 points/second for GraphQL)
- Add delays between bulk translation operations
- Langbly has no per-second rate limit, only monthly character quotas
Next Steps​
- n8n Community Node: Automate translations with n8n
- Glossary Support: Consistent e-commerce terminology
- HTML Translation: Preserve product description formatting
- API Reference: Full API documentation