Changing Text in Joomla 3.1 using Language Overrides
In our last tutorial, we gave you a brief introduction about Joomla 3.0 language files. If you remember, there are three basic things involved:
- Language (such as English or Spanish)
- Constant (such as COM_CONTENT_WRITTEN_BY)
- Value (such as Written by or Excrito por)
Can I modify standard text in Joomla?
What if you didn't want it to say, Written by? What if instead you wanted it to read, Article author?
You could edit the language file and change Written by to Article author, but if you upgraded Joomla, you run the risk of losing those changes if any of the language files get overwritten.
Joomla 3.0 includes a feature called Language Overrides. Using language overrides allows you to change the Value (Written By) of a Constant (COM_CONTENT_WRITTEN_BY) without editing any Language Files (language/en-GB/en-GB.com_content.ini).
Using Language Overrides in Joomla 3.0
In the following steps, we'll show you how to use language overrides. We will change Written by to Article Author.
- Log into your Joomla 3.0 Admin Dashboard
- In the top menu, click Extensions and then click Language Manager
- In the left menu, click Overrides
- In the top left of the page, click New
- Find the Constant or Value to change
Under Search text you want to change and next to Search for choose Value. Then, type in the text you want to change (Written by in our example) and click Search.
Under Search Results, click on the only result. This will automatically fill in the details for you under Create a New Override.
- Change the Text
Under Create a new Override and next to Text, you'll see the Value. In this case it reads Written by %s. Change this to the text your prefer, in our case Article Author: %s.
- Click Save in the top left of the page and then test your results! As you can see in the screenshot to the right, the Written by text has been changed to Article Author.
Joomla Community Google+ Hangout #3
June 3rd, 2014
Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!
Support Center LoginOur Login page has moved, Click the button below to be taken to the login page.
Social Media Login
Working with Languages in Joomla 3
|1.||How to change your site language in Joomla 3.1|
|2.||Understanding Language Files in Joomla 3.1|
|3.||Changing Text in Joomla 3.1 using Language Overrides|
2014-06-05 12:21 pm
thanks, its help to translation in urdu (pakstani) language. Arabic to Urdu because urdu translation pakage is not availabel.
2014-09-26 4:56 pm
when i try to search for an existing constant like PLG_SYS_EPRIVACY_MESSAGE - or a value I know exists (extension is active and working) it returns no results. Maybe the search function doesn't search plugins constants starting PLG_ and only searches MOD's and COM's and so on?
2014-09-26 5:06 pm
Thanks for the question. The tutorial above demonstrates that the function is used to search for text within the Joomla site presented on the web. It's not used to search for code, like the plugin code or values. If you have text that's appearing on the Joomla site, this function can be used to search and override it.
I hope that helps to clear up the issue. Please let us know if you have any further questions.
2014-09-26 5:27 pm
Well it's a production site I am search on and the plugin is active and the text does show on the site. I have seached for a common string and although I got over 100 results there were no constants returned with prefix PLG_ - only JLIB_ TPL_ JLIB_ PHPMAILER_ JERROR_ JGLOBAL_ COM_ FILES which makes me think plugins are not being included in the search? :/
2014-09-26 5:44 pm
That is very likely correct. If you are unable to replace text that's being generated through a plugin, then you may need to look at the plugin itself to have that text changed. The example shown in the screenshots above is the best way I can think of to define how this particular function works. It's basically looking for a constant text string and then replacing it with the text string that you specify.
Sorry if our answer is unhelpful for your particular issue. You may want to contact the plugin's author if you are trying to change its output.
2014-11-24 9:58 am
You can find a list of Joomla constants on their site along with descriptions of what they do.
2014-12-04 2:59 pm
If the search function return no results, use the common search of windows (for me windows xp) and search the string INTO THE FILE, not the name of the file. choose "language" folder in your root folder. Open it in notepad or pspad and search with the program. then copy the result in the joomla overide language manager.
2016-06-03 7:50 am
What if you wanted to create an override for a different language other than en-GB. If you have a multilingual site with more than one language, and you find that one of the translations is wrong, what I see from the above is that you can only change the default language and no others?? am i correct?
2016-06-03 9:59 am
No, if you have multiple languages installed then you should be able to change them as well as the folders will be in the same location. If you are not able to choose between the languages then you may need to get a plugin/component in order to edit the necessary files.
2016-07-11 1:10 am
It's works on J.3x, am just change text "Hits:" to Dibaca sebanyak: %s kali.Language Constant: COM_CONTENT_ARTICLE_HITSText: Hits: %s
Replace to be:Dibaca sebanyak: %s kali. [Indonesian Bahasa]
Thank you brada..