Skip to main content

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.

The most flexible approach uses n8n (open-source workflow automation) to orchestrate translations between Shopify and Langbly.

Setup

  1. Install n8n (self-hosted or cloud)
  2. Install the n8n-nodes-langbly community node
  3. Get your Langbly API key (sign up free)
  4. 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

  1. Shopify Trigger: Watch for new/updated products
  2. Langbly Node: Translate title to target language
  3. Langbly Node: Translate body_html with format: html to preserve formatting
  4. 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:

  1. Install the Langbly Zapier app (search "Langbly" in Zapier)
  2. 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 TypeAPI FormatNotes
Product titlestextPlain text translation
Product descriptionshtmlPreserves HTML formatting
Collection titlestextShort, keep brand names consistent
Collection descriptionshtmlMay contain rich text
Page contenthtmlBlog posts, About pages, etc.
Metafield valuestext or htmlDepends on metafield type
Navigation menustextShort UI strings
Email notificationshtmlOrder confirmations, shipping updates

Shopify Markets Setup

Before translating, enable multilingual support in Shopify:

  1. Go to Settings → Markets
  2. Add your target markets (e.g., Netherlands, Germany)
  3. For each market, add the target language
  4. Install Translate & Adapt app (free, by Shopify)
  5. 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

SolutionCost 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