Due to the limitations of auto-translation technology used in Transtore, there may be instances where you prefer that our AI does not translate your content. In such cases, you will need to add custom code to your theme to specify that certain content, such as brand names, product names, and product variants, should not be translated.
Below are the details on how to add this custom code yourself, which requires knowledge of CSS and HTML theme code. Please note that we cannot take responsibility for any effects on your store resulting from this customization.
Step 1: Access your Theme code
From your Shopify admin, navigate to Sales channels > Online store > Themes. Select your theme and click on the three dots (⋮) > Edit code.
Step 2: Adding notranslate class to an element
Locate the element that wraps your content. Insert notranslate into its class attribute.
If the class attribute doesn't exist, add it like this: class="notranslate"
Step 3: Protecting Specific Content with notranslate
- If you want to exclude the Brand name in the browser tab title from being translated
- Open the theme.liquid file.
- Locate the <title> element and add the notranslate code to prevent your brand name from being translated.
- If you want to exclude the Product title from being translated
- In the filter box, type "product" to search for the relevant product file.
- Select main-product.liquid or featured-product.liquid (names vary by theme).
- Use Command + F (Mac) or Ctrl + F (Windows) to search for "product.title" or "product_card.title".
- Add the notranslate class to the corresponding element.
- If you want to exclude the Product vendor from being translated
- Locate the element containing "product.vendor" or "cart-product.vendor" and apply the notranslate class.
- If you want to exclude the content in your footer:
- Find the file named footer.liquid in the Sections folder. (The file name might vary depending on the theme, but it’s usually footer.liquid)
- Add the notranslate class to the main wrapper of the footer. In case the class attribute does not exist, please add it: class="notranslate"
<footer class="footer notranslate"> <!-- Footer content --> </footer>
- If you want to exclude the product variants and options (like size, color, etc.) from being translated
- Due to the variety of themes, the file structure for variants and options may differ.
- Look for the template or snippet that outputs product variants. This is often within: product-template.liquid, featured-product.liquid, product-variant-options.liquid,…
Here are a few examples of where to find these elements, but follow a similar process by searching for the terms in your theme files.
<label for="{{ input_id }}" class="notranslate"> {{ value -}} {{ label_unavailable }} </label>
OR
<select name="id"> {% for variant in product.variants %} <option value="{{ variant.id }}" class="notranslate">{{ variant.title }}</option> {% endfor %} </select>
If you are using Dawn Theme (a Shopify 2.0 theme), product variant rendering is often managed in sections/main-product.liquid or sections/product-form.liquid. Look for <select>, <span>, or <label> elements that output variant data.
Meanwhile, in older Themes, Product variants might be handled in snippets/product-form.liquid or directly in templates/product.liquid.
Next, you need to add the notranslate class to the element: locate the element that wraps your content and insert “notranslate” to its class attribute. In case the class attribute does not exist, please add it: class="notranslate"
For further assistance, feel free to reach out to us directly at support@transtore.app.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article