Community Forums

Q: How do I translate a page/module to my language?

Q: How do I translate a page/module to my language?

Postby Qphoria » Tue Apr 19, 2011 12:50 pm

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:
a. admin/language/english/module/module_name.php
b. catalog/language/english/module/module_name.php

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:

Code: Select all
// 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:

Code: Select all
// 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
User avatar
Posts: 19865
Joined: Mon Jul 21, 2008 1:02 pm
Donate to Qphoria

Return to Language & Currency

Who is online

Users browsing this forum: No registered users and 1 guest

Hosted by A2 Hosting