Saturday 28 April 2012

Language Overrides - Adding your own text to the standard Joomla System Text

I haven't needed to play with language packs before, but I wanted to do a simple text change for my search bar.



To allow the language of the site and administration areas to be easily changed, plain text is not used in the source code, but constant names are used to link to language files. In this way the language files can be changed at any time without having to change the source code. This is very common in programming, and is best practice even if you do not anticipate a language change at the moment.

First go to Language Manager:



 Here we can add new language packs for the front and back ends, but we want the Overrides tab on the end.



Click New:



Next we want to search for the text that we want to change. I want to change the search fields' text "search...", so I search for search lol. The search results are displayed below the search box and when I click one of the results, it is automatically put into the left-hand box for editing:



I want to change my search text to say "search my site...". Save and it works: