Skip to main content

How to override translation in Joomla 3 template?

Already followed the language installation and configuration instructions and still not reached an acceptable result? Perhaps the item that you want to overwrite is so-called language override!

I'll show you how to change it on the JM Commune Office template.

You may deal with two situations:

  • You’re using a language other than English - then skip step 6.
  • You’re using the default (English) language - then skip steps: 2, 3, 4, 5. 

 

Step 1: choose item to override

This is the example of the template item name that we want to override.  Let's check how to change the "night mode" inscription.

 

language overrides 001

 

Step 2: set English language as default for testing

It's important that for testing you need to go to the backend of your site Extensions-> Languages-> Installed and set English language as default.

 

language overrides 002

 

Step 3: get the constant name

Go to the Extensions-> Languages-> Overrides and click New.

 

language overrides 003

 

Type in inputbox what you want to change (for example "night mode") and click search. It will appear the search results. Choose the one that you are looking for. Details of the language override constant should appear on the left. Copy the entire value of the "Language constant" field. The language constant is called: "PLG_SYSTEM_JMFRAMEWORK_CONFIG_NIGHT_VERSION_LABEL". Later we will need the copied value so don't lose it! Click cancel.

 

language overrides 004

Step 4: ser Your language as default

Go to the Extensions-> Languages-> Installed and set your language as default.

 

language overrides 005

 

Step 5: create new translation override

You may need to log off and log in again to the backend of your site. Then go to the Extensions-> Languages-> Overrides and click New (backend is in your selected language now).

 

language overrides 006

 

Paste previously copied language contant into Language constant field "PLG_SYSTEM_JMFRAMEWORK_CONFIG_NIGHT_VERSION_LABEL". In "Text" type your translation. Click Save and close.

 

language overrides 007

 

You made all changes. Site looks like that:

 

language overrides 008

 

Step 6: create new language translation

Go to the backend of your site->  Extensions-> Languages-> Overrides and click New.

 

language overrides 003

 

Type in inputbox what you want to change (for example "night mode") and click search. It will appear the search results. Choose the one that suits you. On the left should appear on the details of the language override. In “text” field type your override. Click save and close.

 

language overrides 009

 

You made all changes. Site looks like that:

language overrides 008