Translatable extension

Discuss PivotX 2.0.x here. Non-PivotX related discussions go in The Drain.

Translatable extension

Postby orgoj » Mon May 10, 2010 11:47 pm

How to make extension translatable? It's possible make separate .po file for extension?
User avatar
Posts: 9
Joined: Tue Apr 27, 2010 9:19 pm
Location: Czech

Re: Translatable extension

Postby hansfn » Tue May 11, 2010 8:43 am

You make strings translatable by using the __ function. Replace

Code: Select all
$var = "Hello, World!";


Code: Select all
$var = __("Hello, World!");

Currently, po files in extensions aren't loaded by PivotX. They have to be merged (manually) with the main po file in the langs directly. We will make a solution for this. Anyway, I would recommend extension authors to include/create the pot file, and then we might include it in the main pot file (for all extensions that are uploaded to It helps translators if there is just one po file to translate ...
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Return to 2.x Discussion

Who is online

Users browsing this forum: No registered users and 2 guests