Post by i2Paq » Sat Feb 20, 2010 2:50 am

Upgrade older or adjust existing languages to current OC version.

I will try to make this as easy as can be, see it as a Dummy's instruction.

Creating a fully functional language set.

First: You should always search the Extensions for the latest version of your Language.
Second: You should search the Free Contributions part of this forum.

The new Language fall-back introduced in 1.4.7 has been removed in 1.5.x so you need all the related files in you additional language otherwise it will NOT work and you will see errors like "Error: Could not load language mail/voucher!".

1. To build a new set of your language files we will use the English language files that comes with the release of your copy of OpenCart as basis.
Your will find 2 sets of English language files in the copy of OpenCart you use:
a. admin\language\english
b. catalog\language\english

2. Create the directory structure on your Pc that reflects the one for your language.
a. admin\language\your-language
b. catalog\language\your-language

3. Copy the English files from your OpenCart installation to the directory's you just created (Make sure you copy that Admin files to the admin part and the Catalog to the catalog part!).
a. Delete the english.php from both directory's.

4. Extract the zip-file that contains your language files and copy these over the English files in admin\language\your-language and catalog\language\your-language. Again, make sure you copy that Admin files to the admin part and the Catalog to the catalog part.

Now the set of files needed for your version of OpenCart has a complete set of files but it is surely missing lines of text in the older files and lines of text will show up completely in English.

5. Upload the set of files for your language you just created to your shop.

6. Add the language to you shop setup and then check the whole shop to see if you're not getting the: Error: Could not load language your-language!
a. If the error shows up make sure you verify that you have created the new language set correctly.

You will now see that parts of the shop will be in complete English or some lines will show up like: text_cart_delete.
The next part will handle this.

Adjusting the new created set so it will be a complete translation.

There are 2 ways to adjust the just created set language files.

1. Using Agent Ransack (Download)
2. using WinMerge (Download) (Recommended)

1. Using Agent Ransack will let you search the files that belong to your language for the lines of text that you want to change.
If you see: Add to cart, your can copy and past that line into Agent Ransack and search the files for it.
Image


Once you have found the line(s) you can open the files with an editor and stranslate them, I use PSPad (Download).

To find and add missing lines of text you have to first search the English files for that line (text_cart_delete) and then look up that file in your language files and add it.
This is taking a lot of time and therefore it is better to use WinMerge.

2. Using WinMerge (Recommended) will let you compare the English directory with the one from your language.
You need to invest some time in how WinMerge works but you will see it will make live so much easier.
It will also let you find and remove obsolete lines in older files.

The way it works is that WinMerge will show the source files (English) in the left screen and your language files in the right screen. This so you can find and change much easier.
Image

I hope this is of any help to you and I'm sure I left out some things or things could be clearer, please let me know and I will adjust and update this tutorial.
Last edited by i2Paq on Wed Jun 19, 2013 11:29 pm, edited 12 times in total.
Reason: Updated links and fixed typo's

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

UPGRADE to 2.x: Contemplate before thou begins!

Our FREE search: Find your answer FAST!.

BUGs?: Known BUGS for All OC Versions.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands
Who is online

Users browsing this forum: No registered users and 1 guest