How to create your own Language Pack for Joomla extensions

How to create your own Language Pack for Joomla extensions

Learn how to create language translation for our Joomla extensions.
As an example, we are going to use the DJ-Suggester component Russian language pack and translate it to Portuguese-Brasil, by providing some changes in the language file.

The  Language Pack zip file structure

The best way to create your own language pack is to use/edit one of the existing language packs for chosen Joomla extension.
Let’s use the DJ-Suggester Russian language pack as an example here.

As you can the package name [“ru-RU-djsuggester”] shows that the default language is Russian.
The Joomla language packs follow a standard language naming: [xx-XX] with the use of country codes. 
" ru-RU" in the package name works for the Russian language.

In the next step, we are going to create a translation for Portuguese-Brasil, our language tag would be " pt-BR".
It is just an example. Remember that you should use the appropriate language tag for your translation.

Download the language pack and extract the downloaded zip file.

For this example, you should get the following file structure,
  • Administrator (directory)
  • ru-RU-djsuggester.xml (file)
Open the Administrator directory. The following structure used there is:
  • ru-RU.plg_content_djsuggester.sys.ini
  • ru-RU.plg_content_djsugester.ini
All “ ru-RU” names should be replaced with “ pt-BR”. It concerns the zip package name, file names and the content used inside the ru-RU-djsuggester.xml file.

Let’s edit the ru-RU-djsuggester.xml 

Open install.xml in your favorite Text editor.
Search for " ru-RU" in the whole document and replace them as " pt-BR".
Edit the <description/> tag as "DJ-Suggester Portuguese-Brasil Language Pack"

You can also change the:  
  • <name> 
  • <creationDate> 
  • <author> 
  • <copyright> 
  •  <license> 
  •  <authorUrl>
That's it. Save the file.  

Now, open the "administrator" folder and rename " ru-RU" to " pt-BR" in all filenames.
Each .ini file should be saved as UTF-8 without BOM encoding.
As you can see below, each line from the file consists of a pair of strings separated by an equals sign:
  1. PLG_DJSUGGESTER_BASIC_SETTINGS="Основные настройки"
  2. “PLG_DJSUGGESTER_BASIC_SETTINGS=” is an original string here and the "Основные настройки" part is the translated string. 
You need to replace the string after the (=) sign in to your language string. For example:
  1. PLG_DJSUGGESTER_BASIC_SETTINGS="Your Portuguese-Brasil String".
Because as an example we use the Russian language and it is probably incomprehensible to you, you must know that the translated phrase in Russian is a translation from the fragment: “BASIC_SETTINGS”.  You can use the English .ini files for the translations. These files are delivered with the original component zip file package (you can not download the English language pack separately.)
You need to follow the same instructions in all .ini files. Often the structure is more extended and it contains “ Administrator” and “ Site” Folders (instead of administrator folder only).

That's it.
Finally, compress the package into ZIP file called with the same name as before but with replaced “ ru-RU” into “ pt-BR”. In this example, our package name was: “ru-RU-djsuggester”

So you need to change into “ pt-BR-djsuggester
Now the translation is ready and you can install it using the Joomla! Installation procedure.

Congratulations! You have successfully translated the component to your language. 
Check another of our tutorials related to this topic: How to add missing language constants.
      • Related Articles

      • Translation missing?

        If you see an incomplete translation to the desired extension you can easily update it. You can add missing translations to the language files,  You can update missing translations with language overrides, Contact us, and we will provide you with a ...
      • How to install language packs

        To install the other language to the extension you should: Download the appropriate extension's language pack from our downloads section Install the package as a normal Joomla extension using Extension Manager Set your default language in ...
      • How to update Joomla extensions

        Updating the website’s software is a crucial task. This applies to CMS Joomla and all Joomla extensions installed on your website. Updates are essential, they can be necessary because of security reasons, can fix existing bugs or give you the ...
      • How to add missing language constants

        Currently, there are 20 language packs for DJ-Classifieds available.  You can find them all here:  https://dj-extensions.com/downloads/cat_view/130-dj-classifieds/138-language-packs Once the language pack of the chosen language is installed, the ...
      • What is Joomla Quickstart?

        Joomla Quickstart With DJ-Classifieds you can purchase Quickstart so you'll get access to the quickstart installer package as well. The Quickstart is the backup (zipped copy) of the demo from our demo server. It comes with Joomla and you install it ...