Home/Blog/Translation API for E-commerce: Translate Products, Checkout & Emails
E-commerce Guide

Translation API for E-commerce: Translate Products, Checkout & Emails

Selling internationally means translating product descriptions, checkout flows, transactional emails, and customer support. This guide covers how to automate e-commerce translation with an API, with examples for Shopify, WooCommerce, and custom stores.

Thomas van Leer· Content Manager, LangblyFebruary 13, 20269 min read

International e-commerce is no longer optional. Shoppers are 72% more likely to buy when product information is available in their native language, according to CSA Research. Yet many online stores still only serve customers in one or two languages, leaving revenue on the table in markets they could easily reach.

The barrier isn't technology. A translation API can automate the entire process: product descriptions, checkout flows, order confirmation emails, return policies, and even customer reviews. The real question is which parts of your store to translate, how to integrate the API, and what it costs.

This guide covers everything you need to translate an e-commerce store using Langbly's translation API, with specific guidance for Shopify, WooCommerce, and custom-built platforms.

What Needs Translating in E-commerce?

Before you start integrating an API, map out everything your customers see. Most e-commerce stores have more translatable content than you'd expect:

  • Product titles and descriptions: The highest-priority content. Product pages are your conversion engine, and they need to read naturally in every target language.
  • Category and collection names: Navigation must be in the customer's language or they won't find your products.
  • Checkout flow: Cart, shipping options, payment form labels, error messages. A single untranslated error message can cause cart abandonment.
  • Transactional emails: Order confirmation, shipping notification, delivery confirmation, return instructions. These build trust and reduce support tickets.
  • Return and refund policies: Legal content that must be clear in every language you sell in.
  • FAQ and help pages: Customer self-service content reduces support costs in every market.
  • Customer reviews: Translating reviews from other markets provides social proof for local customers.
  • Size guides and specifications: Technical content that often includes units and measurements that should be localized.

A typical e-commerce store with 200 products, a blog, and standard pages has roughly 1 to 3 million characters of translatable content. Multiplied across 5 target languages, that's 5 to 15 million characters for the initial translation, plus ongoing costs for new products and content updates.

Shopify + Translation API

Shopify Markets makes it straightforward to sell in multiple languages. You define your target markets in the Shopify admin, and Shopify handles URL routing, currency conversion, and hreflang tags. What it doesn't do is translate your content. That's where a translation API comes in.

How Shopify translation works

Shopify stores translatable content in a Translations API. Each resource (product, collection, page, etc.) can have translations registered for any locale. You can populate these translations manually, via an app, or programmatically using the Shopify Admin API.

Automating translation with the API

Here's a workflow for translating your Shopify product catalog using the Langbly API and Shopify's Admin GraphQL API:

import Langbly from 'langbly';

const langbly = new Langbly({ apiKey: process.env.LANGBLY_API_KEY });

async function translateShopifyProduct(product, targetLang) {
  // Batch translate title and description in one API call
  const results = await langbly.translate({
    q: [product.title, product.descriptionHtml],
    target: targetLang,
    source: 'en',
    format: 'html',
  });

  return {
    title: results[0].translatedText,
    descriptionHtml: results[1].translatedText,
  };
}

// Example: translate a product to German
const product = {
  title: 'Organic Cotton T-Shirt',
  descriptionHtml: '<p>Made from <strong>100% organic cotton</strong>. Available in sizes S-XXL.</p>',
};

const translated = await translateShopifyProduct(product, 'de');
console.log(translated.title);
// "Bio-Baumwoll-T-Shirt"
console.log(translated.descriptionHtml);
// "<p>Hergestellt aus <strong>100 % Bio-Baumwolle</strong>. Erhältlich in den Größen S-XXL.</p>"

After translating, you register the translations with Shopify using the translationsRegister mutation. This stores the translated content in Shopify's system and serves it automatically when a customer visits your store in that language.

Cost estimate for a Shopify store

A typical Shopify store with 500 products, each having a title (~50 characters) and description (~500 characters), has roughly 275,000 characters of product content. Add collections, pages, and policies, and you're looking at about 400,000 characters per language.

LanguagesTotal charactersGoogle Translate costLangbly cost
3 languages 1.2M $14.00 Free (within 500K) or $19/mo
5 languages 2.0M $30.00 $19/mo
10 languages 4.0M $70.00 $19/mo

The initial translation is a one-time cost. Ongoing costs depend on how often you add new products. A store adding 20 new products per week across 5 languages uses roughly 1.1 million characters per month, well within Langbly's Starter plan at $19/month.

WooCommerce + Translation API

WooCommerce is the most popular e-commerce platform for WordPress, and it benefits from the same translation plugins we covered in our WordPress translation guide. The two best options are TranslatePress and WPML, both of which can be powered by Langbly.

TranslatePress + Langbly

TranslatePress is the simplest option for WooCommerce stores. Once configured with Langbly as the machine translation engine, it automatically translates:

  • Product pages (title, description, short description, attributes)
  • Category and tag archive pages
  • Cart and checkout pages
  • My Account pages
  • WooCommerce email templates
  • Product search results

Translations are cached in the WordPress database after the first visit, so subsequent page loads are instant. The visual editor lets you review and refine any translation directly on the live page.

WPML + WooCommerce Multilingual

WPML with the WooCommerce Multilingual extension is a more feature-rich but complex option. It handles multi-currency, per-language inventory, and translated product attributes with separate WooCommerce settings per language. WPML has its own auto-translation credit system, but you can also connect external translation engines.

Cost comparison for WooCommerce

SolutionPlugin costTranslation cost (5M chars)Total annual cost
TranslatePress + Langbly Free (or $89/yr premium) $19/mo ($228/yr) $228 – $317/yr
WPML + auto-translate credits $99/yr (CMS) + $49/yr (WC) ~$72 per 5M chars ~$220/yr + credits
TranslatePress + Google API Free (or $89/yr premium) $100/mo ($1,200/yr) $1,200 – $1,289/yr

For WooCommerce stores using 5 million characters per month, TranslatePress with Langbly is the most cost-effective option and provides higher-quality, context-aware translations.

Custom E-commerce + Translation API

If you're building a custom e-commerce platform (with Next.js, Remix, Laravel, or another framework), you have full control over how and when translations happen. Here's a practical approach using the Langbly API.

Translating product data via API

import Langbly from 'langbly';

const client = new Langbly({ apiKey: process.env.LANGBLY_API_KEY });

async function translateProductCatalog(products, targetLang) {
  const results = [];

  // Process in batches of 20 products
  for (let i = 0; i < products.length; i += 20) {
    const batch = products.slice(i, i + 20);

    // Flatten all titles and descriptions into a single array
    const textsToTranslate = batch.flatMap((p) => [p.title, p.description]);

    const translations = await client.translate({
      q: textsToTranslate,
      target: targetLang,
      source: 'en',
      format: 'html',
    });

    // Map translations back to products
    for (let j = 0; j < batch.length; j++) {
      results.push({
        ...batch[j],
        title: translations[j * 2].translatedText,
        description: translations[j * 2 + 1].translatedText,
        language: targetLang,
      });
    }
  }

  return results;
}

Caching translations for product pages

Product pages are the most frequently visited pages on an e-commerce site. Cache translations aggressively to avoid redundant API calls and reduce page load times:

import Redis from 'ioredis';

const redis = new Redis(process.env.REDIS_URL);
const client = new Langbly({ apiKey: process.env.LANGBLY_API_KEY });

async function getTranslatedProduct(productId, targetLang) {
  const cacheKey = `product:${productId}:${targetLang}`;

  // Check cache first
  const cached = await redis.get(cacheKey);
  if (cached) {
    return JSON.parse(cached);
  }

  // Fetch original product
  const product = await db.products.findById(productId);

  if (product.language === targetLang) {
    return product; // Already in target language
  }

  // Translate
  const translations = await client.translate({
    q: [product.title, product.description],
    target: targetLang,
    source: product.language,
    format: 'html',
  });

  const translated = {
    ...product,
    title: translations[0].translatedText,
    description: translations[1].translatedText,
    language: targetLang,
  };

  // Cache for 7 days
  await redis.set(cacheKey, JSON.stringify(translated), 'EX', 7 * 24 * 60 * 60);

  return translated;
}

Translating transactional emails

Order confirmation and shipping notification emails should be in the customer's language. Store the customer's language preference and translate email templates at send time:

async function sendOrderConfirmation(order) {
  const customerLang = order.customer.language || 'en';

  if (customerLang === 'en') {
    // Send English template directly
    return sendEmail(order.customer.email, englishTemplate(order));
  }

  // Translate the email body
  const result = await client.translate({
    q: englishTemplate(order),
    target: customerLang,
    source: 'en',
    format: 'html',
  });

  return sendEmail(order.customer.email, result.translatedText);
}

HTML Translation for Product Descriptions

E-commerce product descriptions are almost always formatted with HTML. They contain bold text, bullet lists, size tables, and embedded images. When translating product descriptions, it's critical to preserve this formatting.

Langbly's API handles HTML natively when you set format: "html". The API:

  • Preserves all HTML tags: Bold, italic, links, images, tables, and custom elements pass through unchanged.
  • Only translates visible text: Tag attributes like href, src, alt text on images, and CSS classes are not modified.
  • Maintains document structure: Headings, paragraphs, and list items stay in the correct order.
  • Handles inline formatting: A sentence that's partially bold stays partially bold after translation.

This is especially important for product descriptions that include specification tables, size charts, or ingredient lists. Sending HTML content with format: "text" will corrupt the markup, so always use format: "html" for rich content.

Cost Calculator: How Much Does E-commerce Translation Cost?

Here's a breakdown for three common store sizes, translating into 5 languages:

Store sizeProductsTotal chars (5 langs)Google TranslateLangbly
Small store 50 products ~500K Free (within tier) Free
Medium store 500 products ~3M $50/mo $19/mo
Large store 5,000 products ~25M $490/mo $69/mo
Enterprise 50,000+ products ~200M+ $3,900/mo $199/mo + overage

These estimates include product titles, descriptions, categories, and standard pages. They assume an average of 550 characters per product (title + description) and about 500,000 characters for site-wide content (checkout, policies, FAQ, etc.).

Ongoing costs depend on your product update frequency. A store adding 50 new products per week across 5 languages uses roughly 2.75 million characters per month for product content alone. At Google's rate ($20/1M), that's $55/month. With Langbly's Starter plan, it's included in the $19/month flat rate.

For stores with seasonal catalogs (fashion, home goods, consumer electronics), translation volumes spike during product launches. Langbly's predictable monthly pricing avoids unexpected bills during these peak periods. Overage is billed at $4 per million characters, compared to Google's $20 per million.

Best Practices for E-commerce Translation

Translate product titles separately from descriptions

Product titles need to be concise and keyword-optimized for the target market. Translate them in a separate API call from descriptions so you can review and adjust them independently. A product called "Cozy Knit Throw Blanket" in English might need a completely different phrasing in German to match local search patterns.

Use glossaries for brand terms

Brand names, proprietary terms, and specific product names should not be translated. If your brand is "EverGlow" and your product line is "SilkTouch," make sure the translation API knows to keep these in English. You can handle this by pre-processing your text to protect brand terms, or by using placeholder strings that you swap back after translation.

Cache aggressively

Product pages are viewed hundreds or thousands of times per day. Translate each product once and cache the result. Invalidate the cache only when the source content changes. A Redis cache with a 7-day TTL works well for most stores. For high-traffic stores, consider writing translated content to your database as a permanent record.

Translate SEO metadata

Product titles and descriptions aren't just for customers. They're also what appears in search engine results. Make sure you translate:

  • Meta titles and descriptions
  • Open Graph titles and descriptions (for social sharing)
  • Image alt text
  • URL slugs (where your platform supports it)

Localize, don't just translate

Translation is the first step. True localization also includes adapting currency formatting, measurement units, date formats, and cultural references. Langbly's translations automatically handle locale-aware formatting, such as using commas for decimal separators in European languages and adjusting date formats to local conventions.

Test your checkout flow in every language

A broken checkout flow in any language means lost sales. After translating, walk through the entire purchase process in each target language. Check that form labels, validation messages, error states, and payment confirmation pages are all correctly translated and properly laid out (some languages are 30-40% longer than English).

Summary

Translating an e-commerce store is one of the highest-ROI investments you can make for international growth. With a translation API, you can automate the entire process, from product descriptions to transactional emails, at a fraction of the cost of human translation.

Langbly makes this especially cost-effective: a medium-sized store with 500 products across 5 languages costs $19/month to keep fully translated, compared to $50+/month with Google Translate. The translations read more naturally than NMT engines, which matters for product descriptions that need to persuade and convert.

Start with your product catalog. Add checkout and email translations next. Then expand to customer support content and reviews. With 500,000 free characters per month, you can begin translating your store today at zero cost.

Related Articles

E-commerceTranslation APIShopifyWooCommerceProduct TranslationInternationalization

Start translating your store for free

Langbly gives you 500K free characters/month. Translate your product catalog, checkout flow, and transactional emails at a fraction of the cost of Google Translate.