Recently a question came up from a Shopify merchant:
Please help... this keeps showing up on my website :-(
translation missing: en.general.newsletter_form.description
in place of certain buttons such as the cart button, newsletter, add to cart etc...
This isn't a good error to see, especially if it's showing up on conversion elements like your add to cart button. You can probably bet that you're going to lose a lot of sales if your customers see that.
Luckily, 'translation missing' errors are easy to fix.
1. Go to your languages panel in the Shopify admin
- Login to your Shopify Admin panel
- Go to your Online Store section
- Go to the Themes sub-section
- You should see your current theme. Click the little '...' button near the top right and select the Edit Language option
2. Edit the language item
In here, look for the section that matches the error message. When you find it, enter what text should be viewed there.
An easy way to find the missing item is to break apart the error. Each period acts like a space that separates the sections of information. In the question above the error was for en.general.newsletter_form.description
which means:
- en - English
- general - General tab
- newsletter_form - Newsletter form section
- description - Description field
2b. What if it's actually missing (Advanced)
Sometimes though, the field isn't there at all, and there isn't a description field as shown below.
This means that the theme is using a non-standard language item that wasn't setup. But it's an easy fix.
- Go back to your themes
- Click the "..." button again but this time choose Edit HTML/CSS
- Once in here look on the left for the Locales directory and click it once to open it
- Click on a file named "en.json" or "en.default.json" (or if your translation error started with another language prefix like fr, open that file)
This is the raw language file for your theme. You were editing it earlier using the language panel.
What you need to do now is to search through the file for the sections you found previously. Instead of tabs, sections, and categories though, this file uses indentation and { }
to separate things.
Once you find the right place, add the new item the error was complaining about there. Make sure to put the field name in double quotes, followed by a colon, and then your text wrapped in double quotes. If there is another item after the one you add that is indented the same as yours, add a comma at the end just like you would with a list.
It should look like this:
"description": "Our newsletter contains our monthly sale"
Once added, click save. You'll now have the translation added and the error will go away.
Fixing Shopify translation errors is easy and important
Shopify does a great job with making translations easy but sometimes your theme will use a new one, causing this error. It's important to know how to fix it by adding to the translation panel or editing the translation file directly.
If you need help or run into problems with it, feel free to contact me for help.