Translation Guide
This guide explains how to add, manage, and update translations for your Shopify theme.
How Translations Work
Section titled “How Translations Work”- Locale Files store translations in JSON format (e.g.,
ar.json,fr.json) - Liquid Tags reference translations:
{{ 'key.path' | t }} - Shopify Admin manages language enablement
- Automatic Loading serves correct translations based on customer locale
Locale File Structure
Section titled “Locale File Structure”{ "general": { "accessibility": { "skip_to_content": "Translation here" }, "meta": { "page": "Translation with {{ variable }}" } }, "products": { "product": { "add_to_cart": "Translation here" } }}Adding New Translations
Section titled “Adding New Translations”Step 1: Create Locale File
Section titled “Step 1: Create Locale File”Create the JSON file for your language (e.g., ar.json for Arabic).
Step 2: Enable in Shopify Admin
Section titled “Step 2: Enable in Shopify Admin”Go to Settings > Languages, add the language, and publish it.
Step 3: Upload Translations
Section titled “Step 3: Upload Translations”Either import via Settings > Languages or edit the locale file directly in the theme editor.
Step 4: Test
Section titled “Step 4: Test”Preview your theme and switch languages to verify translations.
Best Practices
Section titled “Best Practices”Maintain Consistency
Section titled “Maintain Consistency”Use the same terminology and spelling throughout. Don’t mix formal/informal forms for the same words.
Consider Text Length
Section titled “Consider Text Length”RTL text can be shorter or longer than English. Always test with actual translations, not placeholders.
Handle Pluralization
Section titled “Handle Pluralization”Arabic has 6 plural forms:
{ "product_count": { "zero": "No products", "one": "One product", "two": "Two products", "few": "{{ count }} products", "many": "{{ count }} products", "other": "{{ count }} products" }}Cultural Considerations
Section titled “Cultural Considerations”- Currency: Use the correct currency symbol for the region
- Numbers: Keep Western Arabic numerals (1, 2, 3) unless specifically requested
- Date formats: Use locale-appropriate formats
Avoid Concatenation
Section titled “Avoid Concatenation”Bad:
{{ 'general.welcome' | t }} {{ customer.name }}Good:
{ "welcome_message": "Welcome {{ name }} to our store"}{{ 'general.welcome_message' | t: name: customer.name }}Priority Translation Order
Section titled “Priority Translation Order”- Critical: Navigation, product actions (Add to Cart, Buy Now), accessibility labels, checkout flow, error messages
- High: Product details, search, account/login, footer links, form labels
- Medium: Marketing copy, product descriptions, blog content
- Low: Legal pages, advanced features
Working with Translators
Section titled “Working with Translators”Provide a translation brief including:
- Target audience and region
- Tone (formal, casual, luxurious)
- Important brand terms and their translations
- Items not to translate (brand names, SKUs, URLs, size codes)
- Desired format: valid JSON, UTF-8 encoding
Quality Checklist
Section titled “Quality Checklist”- All keys translated
- Pluralization rules followed
- Variables (
{{ }}) preserved - JSON syntax valid
- Reviewed by native speaker
Testing Translations
Section titled “Testing Translations”- Enable locale in Shopify Admin
- Upload translation file
- Preview theme with locale
- Navigate all pages: Homepage, Collections, Products, Cart, Search, Account, 404
- Check for missing translations, text overflow, broken layouts, and incorrect plurals
Common Issues
Section titled “Common Issues”Special characters breaking JSON:
Escape quotes within translations: \"quoted text\"
Variables not replacing:
Ensure variables use double curly braces: {{ price }} not just price
Plural forms not working:
Use the correct plural form structure with zero, one, two, few, many, other keys as needed.
Updating Translations
Section titled “Updating Translations”When new features are added or text changes:
- Compare old vs new English locale to identify new/changed keys
- Send changes to translator
- Update locale files
- Test changes across all pages