Articles on: Frequently Asked Questions (FAQ)

Translating the Cookie bar with the locale files

In order to translate the Cookie bar using your theme’s locale files, please follow the below steps. The example given is when the Default store language is English and you need to translate it into German as well:

Go to your Shopify Admin.

Click on Online Store link located on the left menu bar.

Click on the Actions dropdown button and select Edit Code from there.

A new page will open with a list of files on the left side of the screen. Scroll down to the Locales folder which contains your theme’s locale files.

Locate the JSON locale, for the Default language of the store and paste the content of the below file:

Download Local Translation JSON Update

The JSON code also needs to be added to the {language}.json files that your store is translated to, as shown in this example:

Translate the properties of the JSON code to the corresponding language as shown in the example above.

Save the changes on the locale files by clicking on the Save button.

Copy the modified metafields code provided in this file:

Download Local Translation Metafields Update

Note: If you have already added the metafields code, you should replace it with the one provided in the file above.
Open the theme.liquid file and paste the metafields code under the <head> element.

Save the changes on the theme.liquid file by clicking on the Save button.

Updated on: 09/02/2024

Was this article helpful?

Share your feedback


Thank you!