Swatch colors are blank on the translation page

This issue may occur after translation. Swatch codes are designed to look for specific keywords in the "default language" of your store. Translating these keywords can cause the swatches to break, such as:

  • Displaying the wrong color.
  • Failing to display at all.


Common Cases and Solutions

Case 1: Option Name

Themes often recognize swatch layouts based on specific option names like "color." If translated, the theme may not recognize it, causing the swatch to break.


Solution

The solution is not to translate the option name "color" or to keep it the same as the default text, so that the theme logic will work correctly on the translated site. After that, you can use the Visual Editor or enable auto-coverage to translate the word "color" into other languages. The translation in Visual Editor or via auto-coverage will not impact the theme's logic.

Make sure the translation is the same as the default text, or simply remove the translation.


How to Use the Visual Editor Tool to Translate the "Color" Option

  1. Navigate to the Visual Editor page in the sidebar and select the language you want to translate.


  1. Click "All translations" to create the translation through custom translation, then click "Add translations".


  1. Add the base text "color" and the translation text, then click create.


How to Use the Auto Coverage Translation to Translate the "Color" Option

  1. Navigate to the Languages page, and click "more action" on the language, then enable auto coverage.



Case 2: Color Mapping in Theme Code and Product Variant Options

When the color map is used to match colors with images or styles in CSS and product variants, translating only one of them (either the image/style or the variant) can cause issues, preventing the swatch from displaying correctly.


Solution

The solution is to translate both the swatch configuration under the theme and the variant under the product. The translations should be consistent to ensure the swatch displays correctly.

You can translate the swatch configuration and product variant either using AI or Manual translation.


Color Text <> CSS:

Translate the color text and ensure the CSS color values remain consistent across languages.


Color Text <> Color Image:

Translate the color text and ensure the color image remains consistent across languages.


Product variant:

The translation of the product variant should match the translation of the color text in the swatch configuration.

Just like the Case 1 mentioned above, you can also resolve this issue by using the visual editor. For instructions on using the visual editor for translation, please click here.

Tip

For all cases, we can always remove these translations, and then enable the "auto coverage". Therefore, the theme logic is not affected by the translation, and the texts are still translated on the website.


If you have any questions or concerns about the color swatch, or anything else, please send us a message at help@hextom.com

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us