Joomla 2.5 released with a host of new features. Some of these new features were major improvements including multi-database support, smoother upgrades and new search engine. Other improvements were smaller but still very useful. For example, using the new Language Override Manager you can now easily change any of the default text on your Joomla site.
A language string is composed of two parts: a specific language constant and its value. Up to now if you wanted to write your own labels and text messages you needed to actually go to your language folder and replace language strings or in some cases rewrite the entire file.
Now with Joomla 2.5 there is a built in language string search and change plugin that makes this a relatively simple task. It requires absolutely no knowledge of coding. It doesn’t affect the core files, so deleting your changes and reverting back to the original is a piece of cake.
In this tutorial we’ll show you how to use the Language Manager.
Step 1. Access the Language Manger
Go to Extensions then Language Manager.
Step 2. Go to the Overrides panel
Click Overrides in the panel menu on the Language Manager Page.
Step 3. Choose your view
- Choose your view.
- Click New.
If you haven’t created any overrides yet, the list will be blank and you’ll need to start adding them. There are two views to choose from the site view and the administrator’s view. Each one will give you different results.
On the left side of the page you will see the form for creating the override, however you can’t create it until know what you want to override. On the right side of the page is a search utility to help you find what you need.
Step 4. Choose your search method
The instructions give you the basic information you need to understand what to search for. If you’re just getting started doing this, you will want to use the “Value” method.
The addition of another plugin, module or template is going to create a new set of language files for that addition. You probably want to wait until you have everything installed so you won’t have to repeat this process. If you add anything after you launch, you will need to do another search and update any additions.
Step 5. Search for the value
Type the value in the search field, and make sure you have chosen value as the method. Above you can see the results when I searched for “home”
Be sure to check More Results to make sure you are seeing ALL the choices.
Note that there are ten pairs listed and there may be more after you click more results. You will have to create a new entry for every one of these that applies, so you may be rewriting lots of them. Let’s choose a simpler example and work through a change.
Step 6. Creating an Example Language Override
In this example I’m going to change the value “You are here” in the breadcrumbs to “You are on this page:”.
- Following steps 1, 2 and 3, get to the search form for the “Site” view.
- Type in the search phrase “you are here”.
- Click Search.
- Now you see the list, click the one or ones you want to change and the form on the left will be populated with the default value.
- Change “You are here” to “You are on this page”
- Click Save.
- Repeat this step for all three of the strings you found or at least the ones you want to change.
- Click Save after each change.
Notice that in this example there are three strings. One for a description, one for a label and one for the text itself. Since I only want this change on the front end, I only need to change one string – the text itself called MOD_BREADCRUMBS_HERE
After saving, click the close button. Your changes will show up on this list. You can the edit them from here if you want to make changes.
Repeat this process for the Administration view to check for a strings listed there. There aren’t any administration strings for this example, but some others are much more complicated. Just make sure you do a thorough job.
Note: As I write this there seems to be a bug in the plugin that will not allow you to save consistently. Save and New and Save and Close do not seem to work as expected. In my case they deleted my entire list of saved changes. If you are having this problem, make sure you have the latest update and report it to the Joomla Bug Squad. 2.5.1 is still brand new, and this isn’t unexpected.
You have now successfully changed “You are here” to “You are on this page” on the front end of Joomla 2.5.1.
These changes are easily reversible by simply deleting the changed item from the list on the Language Manager: Language Overrides page.
If you want to make permanent changes, or a special language file for your own creation you can modify the language .ini files directly. Nick has written a great tutorial on how to find what you need and make the changes.
Location of language .ini files
The image above shows you a partial list of the language files that would need to be changed if you were to do this manually. You can see it’s not a small task. It’s great the Joomla Team has come up with a simple way to approach this for us.
For anyone who really wants to know the nitty-gritty of the language files, you can find all of the constant-value pairs in the languages .ini files in the root folder under languages/en-GB for the english language version. Each language pack you add will have it’s own directory in the the languages directory.
You can create your own files or, if you have an older version of Joomla. Nick has written an outstanding tutorial on how to find and edit language strings. See this tutorial for more background and complete instructions.