5

As you all know, once you have installed an extension in the Joomla backend, the description shows. You can either have a plain description from the XML or have a language based one. I have never had problems in the past with language based descriptions however this time I do. The extension is a admin component and has no frontend folder and is for Joomla 2.5.

When I install the component, the description appears as COM_PROJECTS_DESC

The language folder and files are in the correct location and the XML shows as

<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5.0" method="upgrade">
    <name>Projects</name>
    <author>JoomJunk</author>
    <creationDate>15th Jul 2012</creationDate>
    <copyright>Copyright (C) 2012 JoomJunk</copyright>
    <license>http://www.gnu.org/licenses/gpl-3.0.html</license>
    <authorEmail>admin@joomjunk.co.uk</authorEmail>
    <authorUrl>http://www.joomjunk.co.uk</authorUrl>
    <version>1.0.0</version>
    <description>COM_PROJECTS_DESC</description>

<administration>
    <menu img="components/com_projects/assets/images/cpanel_16.png">COM_PROJECT_TO_DO</menu>
    <files folder="admin">
        <filename>index.html</filename>
        <filename>controller.php</filename>
        <filename>helper.php</filename>
        <filename>projects.php</filename>
        <folder>views</folder>
        <folder>tables</folder>
        <folder>models</folder>
        <folder>controllers</folder>
        <folder>assets</folder>
    </files>
    <languages folder="admin">
            <language tag="en-GB">languages/en-GB/en-GB.com_projects.ini</language>
            <language tag="en-GB">languages/en-GB/en-GB.com_projects.sys.ini</language>
    </languages>
</administration>
</extension>

The odd thing is, the description doesnt work when installing for the first time, but if I install the coomponent over it (upgrade) then it does work.

I have used the language debug tool the the language file seems to be loading so Im not sure what the problem is. I has only ever happend to me with extensions specifically for the admin backend and that have no frontend referrence.

Any help would be much apreciated.

Regards

Lodder
  • 19,758
  • 10
  • 59
  • 100
  • It sounds to me to be a Joomla bug. Have you tried adding a front end language file with the language constant? – Søren Beck Jensen Jul 25 '12 at 13:43
  • yes I have tried this already – Lodder Jul 26 '12 at 12:51
  • have ended up having to use install.php but would still be nice to know if this is a Joomla bug or if there is something that needs to be done – Lodder Jul 28 '12 at 13:48
  • Can you add more of your xml file showing the description tag and such? – David Fritsch Aug 20 '12 at 22:10
  • @DavidF: even though I used an install.php file as an alternative, I posted the full XML code – Lodder Aug 20 '12 at 22:19
  • @Lodder : I think the language code doesn't support on xml file while installing the component. you may try with this file `install.joomjunk.php` and your language code. – Mohammed Nagoor Sep 07 '12 at 04:55
  • I have exactly the same problem with my plugin - the first time I install it the description shows up as untranslated string! Could you give me a hint how to achieve the correct behavior with this install.php mechanism? – codeling Dec 07 '12 at 12:31
  • @nyarlathotep - There are some Joomla Docs regarding the install.php file which you can have a look at, else it might be best to ask a new question ;) – Lodder Dec 07 '12 at 12:37
  • @Lodder thanks for your quick reply - do you happen to have a link to these Docs handy? Somehow my google foo hasn't worked yet for that case ;) – codeling Dec 08 '12 at 09:32
  • @nyarlathotep - http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_an_install-uninstall-update_script_file Hope this helps :) – Lodder Dec 08 '12 at 12:44
  • @Lodder a little, yes, thanks. I can now show strings, but still not localized strings, see this other question: http://stackoverflow.com/questions/14186611/load-language-file-during-joomla-system-plugin-installation – codeling Jan 06 '13 at 21:07

1 Answers1

1

You can display the installable description text and if you need to install any sample values through install.joomjunk.php.

I think this link will be helpful for you.

http://docs.joomla.org/Using_the_installer_API_to_support_package_installation

Mohammed Nagoor
  • 884
  • 2
  • 12
  • 25
  • Could you give more details - how exactly would I go about setting the description string from this com_install() method? thanks in advance – codeling Dec 07 '12 at 12:33
  • Go through the above document link,then you can get the "Custom install code" – Mohammed Nagoor Dec 10 '12 at 07:46
  • I can get some strings to show up during installation, yes, but unfortunately cannot do any l10n during setup... any ideas? posted a new question here: http://stackoverflow.com/questions/14186611/load-language-file-during-joomla-system-plugin-installation – codeling Jan 06 '13 at 21:07