Override language text, the right way

07 Oct 2013 11:58 - 29 Apr 2019 10:08 #1 by Demis [Fox-Labs]
Override language text, the right way was created by Demis [Fox-Labs]
If you want to change a text which belongs to the official language files, do not hack them, or your modification will be overwritten on the next upgrade.

Open the language override menu in Joomla admin

Go to "Extensions" > "Language Manager".

Select the tab Overrides. Here you have a table of any current active overrides. Select the language you want to work with from the "Filter" drop down. For example: Language English, related to the site front-end side.
Now press the button "New" on the upper side.

If you have selected the correct filter value on the previous page, now you should see Language: "English" and Location: "Site" as shown in the picture.

As explained by Joomla itself, a language string consists of two parts: a constant and its value. The value is what you see on the front page
You have to use both the constant and the value in order to create your own override.

Suppose that we want to change or remove the string "Subscribe to". We don't know the name of the related constant, so we are going to set the search button to "Search for Value".
While entering the search field for the first time, be patient while Joomla creates a cache of the strings.

Search for "subscribe to" and see the results, which include the strings of Joomla core and third party extensions too. The strings which belong to Fox Contact, contain the prefix COM_FOXCONTACT in their constant.

So click on the item COM_FOXCONTACT_SUBSCRIBE_TO. In this way, the form will be populated with the constant and the value. Here edit the text "Subscribe to" with something you prefer, or even delete the value. Do not touch the constant.

Your modification will be active as soon as you press the "Save and Close" button.

But how does the language override work exactly? Joomla stores your overrides in separate files named en-GB.override.ini in the language/overrides folder. They won't be overwritten during upgrades. In this way, you can safely update Joomla and all your extensions without worrying about losing your changes.

Another string you may want to change is:
"Spam attempt blocked" (string ID: COM_FOXCONTACT_ERR_SPAM_CONTENT_DETECTED)
The following user(s) said Thank You: pierre

Please Log in or Create an account to join the conversation.