Translations
Last updated
Was this helpful?
Last updated
Was this helpful?
We are excited to introduce a new feature in the app called "Mapping Translation Tables" that will greatly simplify the process of adding translations for Shopify attributes. With Mapping Translation Tables, you can now easily create and manage translation mappings, allowing you to provide localised and meaningful representations of attributes to enhance the user experience for your customers. Whether you need to map category codes to descriptive names or convert abbreviations to full words, this feature has got you covered.
Key Features of Mapping Translation Tables:
Easy Setup: Merchants can add a new "translation table" from the app. Each table is identified with a unique ID, such as "cat_codes_to_category."
Add Rules: Within a translation table, merchants can add rows consisting of "from" and "to" values. This allows for defining the translations between the original values (from) and the desired translated values (to).
User-Friendly Interface: The interface for managing translation tables is designed to be intuitive and easy to use, even with a large number of rows. Merchants can add translations one at a time or in bulk using a textarea input, with each translation on a separate line and separated by commas.
Search Functionality: Merchants can search within a translation table to quickly find a particular translation they are looking for.
Edit and Remove Translations: Translations can be easily edited by clicking on the "from" or "to" value within a row. Additionally, merchants can remove translations by clicking a delete button associated with each row.
Using Translation Tables in Mapping Tool:
Once a translation table is defined, merchants can utilize it in the existing attribute mapper. Within the attribute template, merchants can specify a particular lookup translation table and output the translated "to" value. The syntax for this is as follows:
In this syntax, "translation_table_id" refers to the ID of the translation table, and "attribute_to_lookup" is the attribute used to find the corresponding "from" value.
If a table entry for the "from" value is not found, the raw "from" value will be outputted into the template.
Example Usage:
Let's consider a scenario where a translation table named "cat_codes_to_category" has been created to map the category reference codes from the ERP to more meaningful words for display on the storefront. This translation table aims to provide a user-friendly representation of categories. For instance, it maps "BBY" to "Baby," "ACC" to "Accessories," and "PNT" to "Pants."
To utilize this translation table in the mapping tool, we can use the following template:
In this case, the translation table "cat_codes_to_category" is referenced, and the attribute "references.category.code" is used as the key to look up the corresponding translated value. The output in the template will be the translated category name based on the mapping defined in the translation table.