? Success

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
8 Feb 2015

This PR Load the language file from module in ajax interface; Coding is by @piotrmocko at #3651

avatar zero-24 zero-24 - open - 8 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2015
Labels Added: ?
avatar zero-24
zero-24 - comment - 8 Feb 2015

It is tested on #3651 maybe we can merge here on review?

avatar zero-24 zero-24 - change - 8 Feb 2015
Easy No Yes
avatar zero-24 zero-24 - change - 9 Feb 2015
Category Front End Language & Strings
avatar roland-d
roland-d - comment - 10 Feb 2015

@zero-24 To merge is fine but there is a CS issue, we need a blank line after line 76. Once that is done, it can be merged. Thanks.

avatar zero-24
zero-24 - comment - 12 Feb 2015
avatar zero-24 zero-24 - change - 12 Feb 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 12 Feb 2015

based on @roland-d's comment i move this here now to RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6020.
avatar jackkum
jackkum - comment - 12 Feb 2015

@zero-24
Sorry for the stupid question, what means RTC? :smile:

avatar zero-24
zero-24 - comment - 12 Feb 2015

@jackkum

RTC is Ready to Commit so a maintainer can merge the PR :smile:

avatar jackkum
jackkum - comment - 12 Feb 2015

@zero-24
Thanks very much :smile:

avatar infograf768 infograf768 - change - 12 Feb 2015
Labels Added: ?
avatar infograf768 infograf768 - change - 12 Feb 2015
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 12 Feb 2015
Labels Added: ?
avatar infograf768
infograf768 - comment - 12 Feb 2015

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);
avatar infograf768
infograf768 - comment - 12 Feb 2015

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)

avatar infograf768 infograf768 - change - 12 Feb 2015
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 12 Feb 2015
Labels Added: ?
avatar infograf768 infograf768 - change - 12 Feb 2015
Status Ready to Commit Pending
avatar infograf768 infograf768 - change - 12 Feb 2015
Labels Removed: ?
avatar zero-24
zero-24 - comment - 12 Feb 2015

Thanks @infograf768 i have just add your fix: 9ed8cf2

avatar infograf768
infograf768 - comment - 13 Feb 2015

Thanks. Merged.

avatar infograf768 infograf768 - change - 13 Feb 2015
Milestone Added:
avatar infograf768 infograf768 - change - 13 Feb 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-02-13 06:43:09
avatar infograf768 infograf768 - close - 13 Feb 2015
avatar infograf768 infograf768 - reference | aa7006e - 13 Feb 15
avatar infograf768 infograf768 - merge - 13 Feb 2015
avatar infograf768 infograf768 - close - 13 Feb 2015
avatar zero-24 zero-24 - head_ref_deleted - 13 Feb 2015

Add a Comment

Login with GitHub to post a comment