e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
322 stars 214 forks source link

e107::lan() does not work as intended #360

Closed septor closed 11 years ago

septor commented 11 years ago

This has already been discussed, but I'm throwing this issue up to collect additional information if anyone else runs into this problem.

Currently in v2 the method for including LAN files for plugins (and themes and core files, for this I'll be referencing plugins) is to use e107::lan('pluginname'); or e107::lan('pluginname', true); if the file is an admin file and place your LAN files in the following location/format:

This is suppose to auto select the above LAN files based on the call used. However, it does not currently select the front end LAN files forcing you to use the following call e107::plugLan('pluginname', e_LANGAUGE.'_front');

CaMer0n commented 11 years ago

Correct behavior examples:

e107::lan('faqs');
e107::lan('faqs',true);
e107::lan('faqs',false, true);
e107::lan('faqs',true, true);

will include the following paths:

e107_plugins/faqs/languages/English_front.php
e107_plugins/faqs/languages/English_admin.php
e107_plugins/faqs/languages/English/English_front.php
e107_plugins/faqs/languages/English/English_admin.php 
CaMer0n commented 11 years ago

This can be closed.