Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

[SOLUTION] Captions & descriptions in multiple languages

  • Alexxandar
  • Alexxandar's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #34004 by Alexxandar
Hi all!

I looked on the forum and all I could find is that its a planned feature, well since my client couldn't really wait on the next release :D here is a simple solution that really works great.

open sigpro.engine.php file(full path /plugins/content/jw_sigpro/sigpro.engine.php)
and just before "// Internal parameters" add this:
$langObj =& JFactory::getLanguage();
$lang = "_" . $langObj->getTag();
and then a little bit below, change this:
$captionFile = "labels.txt";
into this:
$captionFile = "labels{$lang}.txt";

Result is that for each language used, new file with captions is created but its called labels_en-GB.txt for english, labels_el-GR.txt for greek, labels_sr-RS.txt for serbian etc.

If you understand Joomlas framework and PHP you can even make this into a feature that can be enabled and disabled.

Enjoy!  ;)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum