Language file definitions - how to change it?

22 views
Skip to first unread message

Daniel Loureiro

unread,
Nov 24, 2017, 11:41:51 PM11/24/17
to Joomla! General Development
Hi everyone,

Whenever I want to change the language definitions of a component I have to re-install the component. I don't know why, but I can't just change the language file definitions - the changes have no effect.

For example, let's say I have a "com_hello" component and want to change the title that appears on "admin > components" menu. If I change its language file ("administrator/components/com_hello/language/en-GB/en-GB.com_hello.ini" and ".sys.ini") it has no effect on the menu. It only works if I uninstall/re-install the component.

My question is: Is it possible to change a component language definitions without having to re-install it? Am I doing something wrong or is this the default Joomla behavior?

--
Daniel

Marvin_Martiano

unread,
Nov 25, 2017, 6:02:13 AM11/25/17
to Joomla! General Development
Use the overrides? Make them one by one in Extensions >. Language > overrides; or make one, see what file is created in the file system under /language or /administrator/language I think, depending on whether site, admin or both; and insert loads.

This assumes it's a one-off, not for other installs elsewhere.

But normally they'd end up in an ini file with your component's name in the title in the language folder(s) (site and/or admin).

((Won't be an issue of accidental wrong file permissions? That would cause errors if installing/updating and error reporting sufficiently high.))

El KuKu

unread,
Nov 25, 2017, 7:01:41 AM11/25/17
to joomla-de...@googlegroups.com
Well, I believe that the components title that appears in admin menu is written to database on installation so changes to the language files after installation would have no effect ;)

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-general+unsub...@googlegroups.com.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.

Marvin_Martiano

unread,
Nov 25, 2017, 7:19:34 AM11/25/17
to Joomla! General Development


On Saturday, November 25, 2017 at 12:01:41 PM UTC, El KuKu wrote:
Well, I believe that the components title that appears in admin menu is written to database on installation
Ah, but what table would that be? No, there's the jos_languages that lists your installed languages; the definitions themselves (as the component's title might be localized) are in the filesystem. If you doubt, export the database to SQL file then search...

No, the overrides will definitely work. The language file if it's still inside your component's folder after install (it shouldn't be) will get ignored.  But look at the [joomlaroot]/administrator/language/[language-code like en-US]/  and [joomla]/language/[language-code]/  folders, for the [code]_com_[your component].sys.ini

AH! But this is assuming you're both (ElKuku + OP) talking about correctly-named components --- it the title is hard-coded then changing language file isn't working obviously, it needs a JText  "COM_MYCOMPONENT_TITLE_LABEL"-type label where it name comes, in the  .xml install file.

M

Daniel Loureiro

unread,
Nov 25, 2017, 7:19:47 PM11/25/17
to Joomla! General Development
Thank guys for your help.

You are correct Marvin, I was looking at the wrong place after all. I thought that after installation, the language file would stay inside the component folder, but no - it's moved to [joomla]/administrator/language. I didn't know that.

Thanks!
--
Daniel

brian teeman

unread,
Nov 25, 2017, 7:43:00 PM11/25/17
to Joomla! General Development
You (or anyone else finding this in the future) may find this documentation useful reference
Reply all
Reply to author
Forward
0 new messages