Translating Metafields, Possible Issues, and Troubleshooting
Hextom: Translate & Currency supports translating fields that Shopify marks as translatable, including metafields.
What are metafields?
Metafields let you store and display custom information that isn’t normally available in Shopify. For example, a candle shop might use a metafield to show burn time, while a grocery store might use one to show an expiration date. Metafields can also be used for internal tracking or to display specialized details on your storefront.
This guide explains how metafields are translated, common pitfalls, and steps to fix them.
Some tips about how metafields appear in our app:
- How to translate metafields
- Possible Issues when translating metafields
- How to troubleshoot these issues
Translating Metafields
The app is able to translate metafields by default with the AI Translation. Here are some tips about how metafields appear in our app:
Metafields are listed by namespace.key.metafield_type. For reference:
Product, Variant, Collection, Blog, and Page-level metafields show up under their respective categories
Metafields from third-party apps appear under Shop & Metafield category.
This field is required to be detected by the theme, in order to reference the information saved. When translating, the namespace.key must be the same. See image below:
Possible Issues
Incorrect namespace.key: If you change or translate the namespace or key, the theme cannot match it, so the metafield value won’t appear on translated pages.
- Metafields from third-party apps: Some metafields must remain untranslated, altering them can break app functions (e.g. cart drawer behavior).
One example is an app called Upcart, where if you translate a specific metafield, it will cause the cart drawer to not close. For further reading, check out this article How-to-fix Cart Drawer Issue with Upcart
Troubleshooting
There are two ways to troubleshoot this issue:
Metafield Value Not Displaying
If a metafield is used by the theme to reference information, and it does not appear, like the image below:
Check the product metafield related to the product. If you are unsure which category is this, we suggest the use of our Keyword Search. Using the value of the material as keyword, we observe the metafield namespace and key:
Use Keyword Search with a known value (for example, “material”) from your store’s default language to find the matching metafield.
We see that a result is this metafield, where it is translated. If you would look closely, notice that the metafield is not identical. What happens is that, due to the translation, the theme cannot match the correct metafield, and as such, does not display the information required.
Ensure the namespace.key in translated input matches exactly the one in the original. If not, either remove the translation or set the namespace.key same as the original. Save your changes and refresh the storefront to test.
Incorrect Metafield Value
If a value appears incorrectly, we suggest running a Scan for the store or specific language. The issue may be caused by outdated translation or metafield information, which can be updated either manually or through a translation task.
If the issue still persists even after updating the metafield value, and also scanned to update these changes, please let us know via help@hextom.com