It often happens that after adding a new language in OpenCart templates and copying language files from the sample languages, some translations are still missing.
In this tutorial we will show you how to deal with missing translations in the newly added languages in Opencart 2x templates.
Log into your hosting cPanel account or connect to your server via the FTP.
Locate the file in which the missing section may be added. Most likely it is a file from the ‘common’ folder (header.php or footer.php) or ‘modules’ in catalog/language/your language’.
Navigate to ‘system/storage/modification/catalog/language/en-gb’ folder, then select either ‘common’ or ‘modules’, and open the correct file with a code editor.
Copy the phrase you want to translate to the same file of your language in catalog/language/your language/common or modules folder, and add the correct translation for it.
Save the file and check the change on your site frontend.
The most frequently asked phrases and their location in the English (sample) language:
Shopping cart (in header section): cart.php in ‘system/storage/modification/catalog/language/en-gb/common’ folder.
Quick View: any of the product modules files (‘bestseller.php’, ‘featured.php’, ‘latest.php’, ‘special.php’ in ‘system/storage/modification/catalog/language/en-gb/module’ folder.
New and Sale labels on products: any of the product modules files (‘bestseller.php’, ‘featured.php’, ‘latest.php’, ‘special.php’ in ‘system/storage/modification/catalog/language/en-gb/module’ folder.
The product tabs names (New, Featured, Specials): tm_module_tab.php file in ‘catalog/language/en-gb/module’ folder (not in ‘system/storage/modification’).
The contact information in header (in some templates): header.php in ‘system/storage/modification/catalog/language/en-gb/common’ folder.
Note: you shouldn’t create a folder for the newly added language in ‘system/storage/modification/catalog/language’ folder, but copy the missing phrases from English to the catalog/language/your language’.
We hope the tutorial was useful for you.
Need more templates? Have a look at our collection of high-quality OpenCart themes.
Feel free to check the detailed video tutorial below:OpenCart 2.x. How to deal with missing translations in new languages