How to Use Language Overrides to Customize the Displayed Text on Your Joomla Site

How to Use Language Overrides to Customize the Displayed Text on Your Joomla Site

Have you found that your Joomla website displays some constants like “Written by”, Category” and “Published”? The contents for these constants are changeable based on the specific situation, but the texts themselves always stay the same.

What if you don’t like the dull words and want some other phrases to replace them? In fact, the replacement can be easily done because Joomla provides you with a Language Manager which includes a feature named Overrides to help you customize the value of any constant.

In below, we will show you the ways to override the standard texts on a Joomla website. The text selected as an example is “Written by” which is the default constant for showing the article author, and the goal is to replace it with “Author:”.

Change Text by Creating an Override

There are several steps to complete. First of all, you have to log into the Joomla admin backend, and find Extensions > Language Manager.

Language Manager

In the left sidebar, click on “Overrides”. If you do not see the sidebar, you will need to expand it first by clicking on the symbol of arrow.

Language Overrides

Use the filtering tool to select the language that is currently used on your site, and then click on the green “New” button to create an override. As the text we’d like to customize is displayed on the front-end in English, we selected the option in the screenshot below.

New Override

Here comes to the most important part – to create a new override. In the search box on the right side of the screen, enter “written by”, and then select “Value” in the drop-down of “Search For”. After hitting the Search button, you will get a search result which displays a language string including the constant and its value.

Search for Language String

Clicking on the language string under “Search Results”, you can get the constant and text filled in the creation form automatically.

Fill in the Creation Form

Modify the “Written by” text in the text box to whatever you want to display on your site. In our case it is Author: %s.

Modify Text

After saving the new override, you can visit your website and see the change.

Text Comparison

Optional Method for Changing Standard Texts

Besides using Language Overrides, there is a more direct method for modifying language strings – to edit the language files. However, we don’t recommend doing so because changes in the language files can be lost when you upgrade extensions or the Joomla core. This way is riskier.

But if you want to know more about Joomla language files and experiment some manual modifications, you can still give a try by following the steps below. Note that you should always make a backup of the files that you’d like to change.

  1. Log into your server and find the file in the location /language/en-GB/en-GB.com_content.ini. Of course, if you use another language, the location is a little bit different, but all the files are included in the language folder.
  2. Download the .ini file to your local computer and edit it with a text editor.
  3. In the file you can see all the language strings of your site and you are able to change the value of any of them. To change the “Written by” constant, you need to find the following line.
  4. COM_CONTENT_WRITTEN_BY="Written by %s"
  5. Modify the text.
  6. COM_CONTENT_WRITTEN_BY="Author: %s"

After modifying all the values you want, save the file and upload it to your server to replace the old file.