Keyword

language files for plugins

  • Gobezu Sewu
  • Gobezu Sewu's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 8 months ago #79698 by Gobezu Sewu
language files for plugins was created by Gobezu Sewu
anyone that have managed to include language files in k2 plugins?i believe i have done it correctly in my plugin discussed over here but can't really make it workthanks

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

More
14 years 8 months ago #79699 by Jiliko.net
Replied by Jiliko.net on topic language files for plugins
Hi Gobezu,

I've added these lines in one of my K2 plugins to have 'myComponent' language file loaded :

$lang = JFactory::getLanguage();
$lang->load('com_myComponent');

Hope it'll help you

Olivier

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

  • Gobezu Sewu
  • Gobezu Sewu's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 8 months ago #79700 by Gobezu Sewu
Replied by Gobezu Sewu on topic language files for plugins
Oliver thanks, but no luck here. I had the following statement earlier

JPlugin::loadLanguage('plg_k2_k2fields', JPATH_ADMINISTRATOR);

in the constructor of the plugin class, which can also be written as $this->loadLanguage(); which all amounts to what you gave above. But it doesn't work, and I can't figure it out.

Olivier Nolbert said:Hi Gobezu,
I've added these lines in one of my K2 plugins to have 'myComponent' language file loaded :

$lang = JFactory::getLanguage();
$lang->load('com_myComponent');

Hope it'll help you

Olivier

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


Powered by Kunena Forum