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?
If you refer to the screenshot to the right, you can see how Joomla shows the author of an article by displaying under the title, Written by Super User.
Question:
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.
Answer:
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.
Â