Translation through language .ini files is a common feature in Joomla! since the beginning.

This short article explains how to translate a visible text of your website using these files.

 

First of all, what is a .ini file?

A .ini file (short for initialization, mostly due to origin) is a text file, using a very common key value format to save settings.

In short, a .ini file is where most of the programs save common settings.

 

Why do I want such a file?

Joomla! has decided to use these files for a very practical reason. Translation.

 

From Theory to Practice

To find these files, we go to our site_root/language/en-GB directory.

That's the language directory of an English website. Other codes exist, like fr-FR for French, es-ES for Spanish, el-GR for Greek, and so on.

In there, you will see many files with names like:

xx-XX.com_extension_name.ini

 

As soon as you open a file, you will see its contents look something like:

KEY_IN_CAPITAL_LETTERS_NO_SPACES="Value in small, capital or any letters"

The left part of the equation (in RED) is the Key, always in CAPITAL letters.

The right part (in BLUE), is the Value, written exactly as you want it to appear.

To translate, or change the text, not necessarily in another language, you just change the Value (in BLUE).

That's all!

 

These texts must by all means keep this format in order to function:

KEY_LEFT_WITHOUT_SPACES_IN_CAPITALS="Value with any letters, but enclosed in double quotes"

 

Below is a part of the en-GB.com_nspro.ini file, from our extension, NS Pro. 

NO_NEWSLETTERS_FOUND="No Newsletters found"
UNSUBSCRIBE_FROM_NEWSLETTER="Unsubscribe from Newsletter"
NO_EMAIL_SPECIFIED="No email specified"
INVALID_EMAIL_SPECIFIED="Invalid email specified"

 

Important: Please remember to keep these files in UTF-8 formatting, while saving.