1

I have a feeling this has an extremely simple solution that I am overlooking...

My component has a language file which does some string replacements (surprise, surprise). Most seem to be working, but when I delete a row from the admin back-end, a successful deletion of a record displays the message:

Message

COM_COURSELIST_N_ITEMS_DELETED

In my language file (admin/language/en-GB/en-GB.com_courselist.sys.ini), where several other translations seem to be working, I have defined:

COM_COURSELIST_N_ITEMS_DELETED="Successfully deleted course(s)"

However, I continue to see the un-translated version of this string. Any thoughts that might point me in the right direction? Thanks.

  • What code do you use to display the message? – elk Apr 23 '15 at 11:23
  • i didn't code that particular message. this message appears by default when the record has been successfully deleted. i've been able to enqueue a message before the delete function runs, but this just prepends the message to this one.. – dustaMaphone Apr 23 '15 at 15:37
  • you could try to include that string definition into one of the general language files (like en-GB.ini) or the overrides file, just to see if it is due to the language file or maybe something is messed up with the code of the message... – elk Apr 23 '15 at 16:29
2

Try to put

COM_COURSELIST_N_ITEMS_DELETED="Successfully deleted course(s)"

into file

admin/language/en-GB/en-GB.com_courselist.ini

NOT into en-GB.com_courselist.sys.ini

The .sys.ini is rather used outside the component (e.g. in the extension manager or in the component configuration).

0

You may have a broken language file. It may be caused by an unclosed string or a weird hidden character.

I test language files with this simple script:

<?php

// php -f check.php

$ini_array = parse_ini_file("en-GB.com_courselist.sys.ini");
print_r($ini_array);

If labels are missing, you can remove lines to find the wrong one.

  • i did this and ran the script from the command line.. the output didn't look weird, so i'm not seeing any hidden characters or anything.. i added some additional lines to the file and the same thing is happening with other language strings, so i think i'm just going to key in the translations one at a time and see if that happens to work. thank you for the input on this topic. – dustaMaphone Apr 23 '15 at 15:38
  • 1
    Also, try to include sys.ini into .ini. Sys.ini are loaded in navigational areas. – Anibal Apr 23 '15 at 15:41
  • 1
    If you enable language debugging in the global configuration and then visit your component admin area, it will warn you of any files with phrase errors and give you an approximation of where in the file (look above the actual line #) You can also see if the language file is loading correctly. – Mathew Lenning May 24 '15 at 8:18
0

Try this

Goto backend -> Extension -> Language manager -> Overrides -> New ->One searh box is available here you can paste the message "COM_COURSELIST_N_ITEMS_DELETED" and related language would be displayed in text field here you can override the language.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.