Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9116021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:34:22+00:00 2026-06-17T04:34:22+00:00

I’m having a real hard time showing a localized string during the installation of

  • 0

I’m having a real hard time showing a localized string during the installation of a system plugin (in Joomla 2.5). The “normal” way with localized strings in the xml file doesn’t seem to work, (see this other question: Language based installation description).

I now tried the way proposed there, to show the description via the install scripts. This kind of works (I can echo text successfully), however, I also can’t localize there – when debugging the language it shows that the plugin.sys.ini is not loaded yet; I tried to manually load the file, but had no success with loading any of my plugin language files.
This is what I got so far (in a file named setupscripts.php):

<?php // no direct access
defined('_JEXEC') or die('Restricted access');

class plgsystemmyplgnameInstallerScript {

    static function loadLanguage() {
        $lang =& JFactory::getLanguage();
        $lang->load('plg_system_myname', JPATH_ADMINISTRATOR);
    }

    function install($parent)
    {
        self::loadLanguage();
        echo JTEXT::_("PLG_MYNAME_TEST_TEXT");
    }
    function uninstall($parent)
    {
        self::loadLanguage();
        echo JText::_('PLG_MYNAME_UNINSTALL_TEXT');
    }
    function update($parent)
    {
        self::loadLanguage();
        echo JText::_('PLG_MYNAME_UPDATE_TEXT');
    }
    function preflight($type, $parent) {}
    function postflight($type, $parent) {
        self::loadLanguage();
        echo JText::_('PLG_MYNAME_INSTALL_TEXT');
    }
}

But I only get ??PLG_MYNAME_TEST_TEXT?? ??PLG_MYNAME_INSTALL_TEXT?? (language debugging is turned on) during installation… weirdly enough, the language debug feature at the bottom of the page under “untranslated strings” shows “None” (where do the question marks then come from if not from a tried but failed translation???).

Tried some variations of it (with .sys at the end of the plugin name, since I actually think the setup strings should be in the .sys.ini file, without the second parameter (leaving it default), but no luck – no error, nothing in the log (in fact my log file isn’t existing, probably there was no entry yet? can one set the log level with Joomla?). But never is there any file loaded (nothing changes under “loaded language files”.

Anybody got an idea how to load the language properly?

Is there something special to consider when loading languages during setup? Why is there no error message if loading the languages fails? Do I maybe have to install the language files to a special location to get them recognized during installation? My current xml looks like this:

<extension version="2.5" type="plugin" group="system" method="upgrade">
<name>PLG_MYNAME</name>
<!-- ... author, copyright, version, .. --> 
<scriptfile>setupscripts.php</scriptfile>
<files>
    <filename plugin="myname">myname.php</filename>
    <filename>setupscripts.php</filename>
    <filename>index.html</filename>
    <folder>sql</folder>
</files>
<!-- ... install->sql->file ... -->
<!-- ... uninstall->sql->file ... -->
<!-- ... update->schemas->schemapath ... -->
<languages [folder="admin"]>
   <language tag="en-GB">en-GB.plg_system_myname.ini</language>
   <language tag="en-GB">en-GB.plg_system_myname.sys.ini</language>
   <!-- ... other languages ... -->
</languages>
<!-- ... config->fields->fieldset->field ... -->
</extension>

(the square brackes around folder=”admin” are supposed to indicate that I tried both with and without this attribute. It doesn’t change anything).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:34:23+00:00Added an answer on June 17, 2026 at 4:34 am

    Finally I found out how to really do it. A thorough search in the google Joomla dev group brought up this very similar question.

    Basically, the language files need to reside in a separate language folder it seems, and the files section also needs to reference them. My xml now looks like this:

    <!-- ... everything else stayed the same, except: -->
    <files>
        <filename plugin="myplg">myplg.php</filename>
        <filename>index.html</filename>
        <folder>language</folder>
        <folder>sql</folder>
    </files>
    <languages folder="language">
            <language tag="en-GB">en-GB/en-GB.plg_system_myplg.ini</language>
            <language tag="en-GB">en-GB/en-GB.plg_system_myplg.sys.ini</language>
            <!-- .. other languages ... ->
    </languages>
    <!-- ... rest of the xml file ... -->
    

    The language files are now all in separate subfolders… they get copied to the exact same location as before (administrator/language//…), but now the description from the XML is also localized!

    I find it very weird that there are so many ways to specify language files, which all basically work except for the one corner case of the installation…

    Hope this will help other people struggling with this!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
Specifically, suppose I start with the string string =hello \'i am \' me And
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.