Q: How do I translate a module to my language?
How can I translate to my language?
Why does this mod show in English when my site is in another language?
OpenCart uses a language fallback to English by default. If you are using a 3rd party extension that was coded for English or some other language that doesn’t have a translation to your language, it will show up in English while the rest of your site is in your custom language. If you want to add support for your language, you will simply need to make a copy of the language file and put it into your language folder. You can simply follow these steps.
This assumes you already have the language pack for your language for the rest of opencart.
1. First locate the language file that comes with the mod. There are almost always 2 files, one admin, one catalog. Let’s assume they are English and are for a 3rd party module. The language files should be found at:
2. Copy the first file from:
and paste into:
3. Copy the second file from:
and paste into:
4. Edit the first file. In the file you will see something like:
<?php // Heading $_['heading_title'] = 'My Mod'; // Button $_['button_submit'] = 'Submit'; // Text $_['text_product'] = 'Product'; $_['text_category'] = 'Category'; ?>
You will need to translate the right-side only of the file.
For example, if we were to translate this to Spanish it would become:
<?php // Heading $_['heading_title'] = 'Mi Mod'; // Button $_['button_submit'] = 'Presentar'; // Text $_['text_product'] = 'Producto; $_['text_category'] = 'Categoría'; ?>
5. Save the translated file and your site should now show the module in your language