September 4, 2024

How To Translate Shopify Metafields and Metaobjects

Arrow pointing left
back to blog

about

Learn how to translate Shopify Metafields and Metaobjects to deliver custom product data in the shopper's native language.

the author

Adam Ritchie
Ecommerce Contributor

share this post

Metafields and metaobjects allow Shopify merchants to customize their storefront according to their exact needs.

Indeed, metafields give you the ability to store and display information that isn’t accounted for in the default Shopify settings — for example, a sunglasses store could create a metafield that indicates the level of polarization for each pair of glasses. And with metaobjects, you can combine multiple metafields into one convenient chunk of reusable structured data. 

If you ship your products internationally, you should know that there are a couple different ways to translate your metafields and metaobjects in Shopify — we’ll walk you through each of these methods below.

Create custom product data with ShogunCMS Collections and Custom Elements allow you to design your own data models and custom-code features for complete storefront control.Get started now

Using the Translate & Adapt App for Metafields and Metaobjects

Metafields and metaobjects can be translated through the Translate & Adapt app, which was developed by Shopify themselves and is available to all merchants at absolutely no cost. 

Once you’ve installed the app (there’s a decent chance that you’ve done this already without realizing it — Translate & Adapt is automatically installed once you add a new language to your store), all you need to do is follow these steps to translate metafields on Shopify:

  • Log in to your Shopify account and select the “Apps” option in the left sidebar of the main dashboard.
  • This will open a popup window listing all the apps you’ve installed on your store — from here, you can open the Translate & Adapt app. 
  • Use the dropdown menu located near the top of the page to select which language you’re translating your content into. 
  • Open the type of resource that you would like to translate, such as a product page or blog post. 
  • Select the specific page you want to translate.
  • The translation editor is split into a side-by-side view — on the left you’ll find your content presented in your store’s default language, and on the right there are empty fields for your translations. If a page has any metafields, they’ll be listed on the left, and you can add your translations on the right.
You can use the Translate & Adapt app to translate metafields on Shopify.

The process for translating metaobjects is similar to translating metafields — the only difference is that metafields are included as items within resources, while metaobjects are categorized as their own resource:

  • Open Translate & Adapt. 
  • Select the “Metaobjects” resource.
  • Select whichever metaobject you would like to translate. 
  • Add your translations to the empty fields on the right. 
You can also use the Translate & Adapt app to translate metaobjects on Shopify.

Using the CSV Method to Translate Metafields and Metaobjects

If you’re having any trouble translating your metafields or metaobjects through the Translate & Adapt app, another option is to use the CSV method.

First, you’ll need to download the spreadsheet file that contains your translations:

  • Select the “Settings” option in the left sidebar of the main Shopify dashboard.
  • Select the “Languages” option in the left sidebar of the settings page.
  • Click on the “Export” button.
Export your translations from Shopify.

The following export settings are available:

  • Language: You can choose “All languages” or select a specific language that you would like to export.
  • Translation status: You can choose to download only outdated content or content that has not yet been translated, which may make editing the file more manageable. 
  • Content: This option allows you to select specific types of content to download for translation, including metafields and metaobjects. 
  • File: You can either download a CSV for spreadsheet programs (Microsoft Excel, Google Sheets, etc.) or a CSV for text editors.
There are several settings you’ll need to configure for your CSV export.

Once you finish configuring these settings and hit the “Export” button, the CSV file will be emailed to you.

You’ll find that this spreadsheet has the following columns:

  • Type: The type of resource (product, collection, etc.)
  • Identification: The resource ID
  • Field: The type of field for the translated content (title, body_html, etc.)
  • Locale: The language that the content is being translated into
  • Market: If applicable, the market that the content was created for
  • Status: If the content is up-to-date this column will be empty; if it is outdated this column will read “outdated”
  • Default content: The content written in your store’s default language
  • Translated content: This column is where you add your translations
Add your translations to the CSV file as needed.

The only column you should be modifying in your CSV file is “Translated content”. Also, if you’re using a spreadsheet program rather than a text editor to work on this file, make sure the default delimiter is set to commas rather than semicolons — otherwise, the columns may not render correctly. 

Once you’ve finished adding your translations to the spreadsheet, the final step is to import the updated CSV file back into your Shopify account:

  • Go back to the “Languages” section of your Shopify settings.
  • Click on the “Import” button. 
  • Select “Add file” to import your spreadsheet from your personal computer files (you can also drag and drop the file into this space).
  • Determine whether or not you would like to overwrite any existing translations, and then select “Upload and continue”. 
  • Review the import summary — if everything checks out, click on the “Import” button.  
Import the CSV file back into your Shopify account.

Using Shogun to Power Translations

Shogun’s CMS Collections feature is quite similar to metafields and metaobjects, as it allows you to create your own custom data models for your Shopify store. 

CMS Collections can be referenced as variables in Custom Elements, which is a Shogun feature that allows you to custom-code your own features for use within Shogun’s visual editor

Let’s face it — a lot of online stores look the same these days. Many merchants sell similar products and services, and they use similar ecommerce templates and features to do so.

With CMS Collections and Custom Elements, you can create truly unique shopping experiences. You’ll be able to stand out from the competition, grab the attention of those who visit your store, and address highly specific customer needs. 

Another benefit of CMS Collections is that any changes you make will automatically be reflected on every page where the collection is deployed. For example, let’s say you’ve previously created a CMS Collection for your hours of operation and now need to update those hours — instead of going in and manually updating each page that happens to reference this information, you would only need to make the edit once. 

Create custom product data with ShogunCMS Collections and Custom Elements allow you to design your own data models and custom-code features for complete storefront control.Get started now

To create a new CMS Collection:

  • After downloading and installing Shogun, select the “Apps” open in the left sidebar of the main Shopify dashboard.
  • Open Shogun. 
  • Select the “Developer tools” option in the left sidebar of the main Shogun dashboard.
  • Select “CMS”.
  • Click on the “Create new…” button. 
  • Enter a name for your collection and add as many properties as needed. 
Create a new CMS Collection for your Shogun account.

Shogun offers the following data type options for your CMS Collection properties:

  • Plain text
  • Rich text
  • Image (HTML)
  • Image (URL)
  • Markdown
  • HTML
  • Integer
  • Boolean/checkbox
There are eight data type options to choose from for your CMS Collection properties.

Once the properties of your CMS Collection are set up, you can then add individual entries to the collection. Also, you can now create and translate Custom Elements that reference the CMS Collection:

  • Go to the “Developer tools” section of the main Shogun dashboard.
  • In the “Custom element” section, click on the “Create new…” button. 
  • You can add Shopify Liquid, CSS, and JavaScript code to create your new Custom Element. Once you’re done coding, save and publish your changes. 
  • On this page, you’ll also find a button labeled “Code with AI” — in addition to creating code from scratch, this tool can be used to translate existing code by submitting a request such as “Translate above code into Spanish”.  
  • While most of the code will remain the same, this will translate the values that are displayed to the end user. Copy this translation and use it to create a new Custom Element.
  • Repeat this process for as many languages that you need to translate the Custom Element into.
You can use the AI writing tool to translate Custom Elements.

The next step is to create an audience segment for your personalized experience. In this case, you would need to create a segment covering all the areas that speak the language you’re translating your content into:

  • Select the “Personalization” option in the left sidebar of the main Shogun dashboard.
  • Select “Segments”.
  • Click on the “Create segment” button.
  • There are several different types of conditions you can use to build your audience segment, including location. You can add multiple conditions to the same segment as well. For example, to target Spanish-speaking visitors, you could create a segment that includes all the regions that predominantly speak Spanish. 
Set up an audience segment for the regions you’re targeting. 

Finally, you can bring the translated Custom Element and the audience segment you just created together in the visual editor:

  • Go to the “Pages” section of the main Shogun dashboard. 
  • Select any page you would like to customize — this will open the page in Shogun’s visual editor. 
  • Click on the “Personalization” button located near the top-right corner of your screen. 
  • Select “Turn on personalization”, then create a new variant for the page and assign it to the variant you just created for those who speak a different language.
  • You’ll now see that the visual editor has two tabs — one for the new variant and another for the original version of the page. Click on the tab for the new variant. 
  • There’s also an AI writing tool available in the visual editor, which you can use to quickly translate all the content on the page (you can make manual edits to these AI translations whenever necessary). And to add the translated Custom Element that you created earlier, click on the “Elements” button in the left sidebar of the visual editor.
  • Scroll down to the “Custom Elements” section of the elements library — you’ll find your translated Custom Element listed here. 
  • Click and hold on the Custom Element, then place it wherever you like on the page.
Create a new page variant, assign it to your audience segment, and add your translated Custom Element.

After following this process and publishing the page, visitors in Spanish-speaking regions will automatically be directed to a version of the page that has already been translated. 

The point of all this is that while you could just rely on the visitor’s browser to translate your content for you, these automatic translations often have errors or are at least missing cultural context. 

By taking the time to set up a more accurate translation, you’ll provide your visitors who speak another language with a better user experience, ultimately leading to more brand loyalty, a higher conversion rate, and more success for your store.

Create custom product data with ShogunCMS Collections and Custom Elements allow you to design your own data models and custom-code features for complete storefront control.Get started now

You might also enjoy

Get started for free

Get hands on with everything you need to grow your business with a comprehensive suite of tools.
Start now
Arrow pointing up and to the right Arrow pointing up and to the right