Another simpler way to localize packages

Permalink 3 users found helpful
Hoping to contribute. here is a simple way to translate a package:


Download Poedit, a powerful product on Win,Mac and Linux (http://www.poedit.net)

Take your module directory, and create the languages tree (in my case, for italian):

/yourmoduledir/languages/it_IT/LC_MESSAGES

create a file named messages.po with the following text:

msgid ""
msgstr ""
"Project-Id-Version: Your Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-10-26 17:39+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: XXXXX YYYYYY <youremail@mail.com>\n"
"Language-Team: XXXXX\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Yourlanguage\n"
"X-Poedit-Country: YOURNATION\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-KeywordsList: t\n"



Enter Poedit and open the file messages.po
From the menu, choose : Catalog / Update from sources

Poedit will scan all the sources into /yourmodule directory and will extract all t() occurrences, populatign the file.

Once you translate and save the .po file, also messages.mo file will be written in the same dir. It will be automatically used by concrete5.

Et voilà....... simple enough ??

matteo
 
Kiesel replied on at Permalink Reply
Thank you, that thread was very helpful for me.

One thing I have to add is that in order to be able to update your catalog you also have to set under catalog/options the path to your module.
Sadu replied on at Permalink Reply
Sadu
Very helpful, thanks also.