Skip to content

derlhurgoyf/opencart_gettext

Repository files navigation

opencart_gettext

Overview

OpenCart_gettext is an extension to convert opencart translations to gettext po-files and vice versa. This way translators can make use of the advantages of using gettext like reusing existing translations and merging suggestions while maintaining the general structure of the OpenCart translation system.

How to use

The three main tools are in the base directory. These are meant to be run from the command line.

createpot.php

This script will read the english translation shipped with the OpenCart release and compile it into a gettext pot file using xgettext.

You may have to adjust the config path to point to the current location of the english translation.

Once run it will create a file called messages.pot in the current directory.

lang2po.php

Once you created a messages.pot template file you can use this script to import existing translations using the template file.

This script will create a directory according to the locale and a messages.po file in LC_Messages containing the found translations.

You have to point it to the language you want to import using the config array at the top of the script.

po2lang.php

This script will convert a messages.po file into the translation structure used by OpenCart. If the configured path already exists it will try to update the translations found therein.

How to translate

The files generated by these scripts can be used by any gettext tool. One instance of a collaborative translation project can be found here: http://magiccardwantlist.wente.dk/translation/projects/opencart/

Bugs

If you found a bug you can file an issue

About

Gettext translation extension for OpenCart ecommerce software

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages