User tests: Successful: Unsuccessful:
This PR Load the language file from module in ajax interface; Coding is by @piotrmocko at #3651
Labels |
Added:
?
|
Easy | No | ⇒ | Yes |
Category | ⇒ | Front End Language & Strings |
done with zero-24@55a3861 @roland-d
Status | Pending | ⇒ | Ready to Commit |
based on @roland-d's comment i move this here now to RTC
Labels |
Added:
?
|
Labels |
Removed:
?
|
Labels |
Added:
?
|
Folks, is this taking into account the loading of the language file from core language folders AS WELL as module/language/ folder?
in com_modules/models/module.php , we use
// Load the core and/or local language file(s).
$lang->load($module, $client->path, null, false, true)
|| $lang->load($module, $client->path . '/modules/' . $module, null, false, true);
I confirm it is not.
I propose to change from
// Load language file for module
$lang = JFactory::getLanguage();
$lang->load('mod_' . $module);
to
// Load language file for module
$basePath = JPATH_BASE;
$lang = JFactory::getLanguage();
$lang->load('mod_' . $module, $basePath, null, false, true)
|| $lang->load('mod_' . $module, $basePath . '/modules/mod_' . $module, null, false, true);
To test, use the module proposed by piotrmocko
http://www.perfect-web.co/downloads/mod_ajaxtester-lang.zip
Unzip it, chnage the lang
folder to language
folder and create an en-GB
folder in that language
folder. move the en-GB.mod_ajaxtester.ini
file in the en-GB
folder.
=> language/en-GB/en-GB.mod_ajaxtester.ini
then modify the xml.
take off
<languages folder="lang">
<language tag="en-GB">en-GB.mod_ajaxtester.ini</language>
</languages>
add the <folder>language</folder>
to get:
<version>3.3.3</version>
<files>
<filename module="mod_ajaxtester">mod_ajaxtester.php</filename>
<folder>language</folder>
<folder>tmpl</folder>
<filename>helper.php</filename>
<filename>index.html</filename>
</files>
save, zip and install.
Follow instructions of use from
See: #3651 (comment)
Labels |
Removed:
?
|
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Pending |
Labels |
Removed:
?
|
Thanks @infograf768 i have just add your fix: 9ed8cf2
Thanks. Merged.
Milestone |
Added: |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-13 06:43:09 |
It is tested on #3651 maybe we can merge here on review?