How to Translate a Joomlashack Extension

You can translate a Joomlashack extension from its default English language to your preferred one. This is a five-step process:

  1. Install your language pack for Joomla.
  2. Create language folders for your Joomlashack extension.
  3. Copy the en-GB language source files for your Joomlashack extension.
  4. Rename the en-GB language source files for your Joomlashack extension.
  5. Translate the language files of your Joomlashack extension.

Let's take a look at these steps in more detail. To demonstrate the process, we will look at how to translate the OSCampus component. You can apply these instructions to any other Joomlashack extension.


Step #1. Install your language pack for Joomla

  • In your Joomla administrator panel, go to "Extensions" > "Language(s)":

go to extensions languages

  • On the next screen, click "Install languages":

click install languages

  • You will be taken to the "Extensions: Install Languages" screen. Find your language and click its "Install" button. As you can see on my screenshot below, I searched tor the Russian language:

find your language and click install

  • After a brief screen activity, you will see the message "Installation of the language was successful.":

installation of the language was successful

  • Go once again to "Extensions" > "Language(s)". Click on the little star icon to set your new language as the default language for your site frontend:

set your new language as default for site

  • You will see the message starting with "Default language saved":

default language saved

  • Go to the box next to the "Search" field. Switch it from the "Site" to "Administrator":

switch from site to administrator

  • Click on the little star button to set your new language as the default language of your Joomla administrator panel:

set your language as default for administrator panel

Excellent! You just switched your Joomla site to a language of your choice. You are now ready to move to OSCampus' language files. 

Step #2. Create your language folders for OSCampus

  • FTP to your Joomla site.
  • Go to /administrator/components/com_oscampus/language/
  • Create in there a new folder, giving it the name of your language tag. For the Russian language that I selected for this tutorial, the language tag is ru-RU. You can find your language tag next to your language on the "Joomla! 3 Translations" page.

Here is my screenshot with the language tag for the Russian language:

the language tag

Good job! You just created a folder for the language files of your OSCampus control panel.

Let's create a similar folder for the language files of your OSCampus frontend pages.

  • Go to /components/com_oscampus/language.
  • Create in there a new folder with the name of your preferred language.

Great! You just created your OSCampus folders for language files. Now is a good time to populate with OSCampus language files. 

Step #3. Copy the en-GB language source files for OSCampus

  • Go to /administrator/components/com_oscampus/language/en-GB.
  • Copy its files into /administrator/components/com_oscampus/language/<your-language>:

administrator panel files copied

  • Go to /components/com_oscampus/language/en-GB. 
  • Copy its file into /components/com_oscampus/language/<your-language>:

copied frontend source files

Wonderful! You are one step away from getting ready to translate your OSCampus. 

Step #4. Rename the en-GB language source files for OSCampus

  • Go to /administrator/components/com_oscampus/language/<your-language>. 
  • Change the "en-GB" language tag in the names of the files to the tag of your language. In my demonstration, I replaced "en-GB" with "ru-RU":

ru ru instead of en gb

  • Go to /components/com_oscampus/language/<your-language>.
  • Just as in the previous step, change "en-GB" to your language tag:

ru ru instead of en gb for frontend file

Superb! You are now all set to start translating your OSCampus.

Step #5. Translate the OSCampus language files

Let's translate first the OSCampus control panel.

  • Go to /administrator/components/com_oscampus/language/<your-language>.
  • Open one of the three files for editing. For my demonstration, I opened up the ru-RU.com_oscampus.ini file.
  • Find a line of text, starting with COM_OSCAMPUS. In Joomla terms, this line is called a "language string". For my demonstration, I picked up the COM_OSCAMPUS_CONFIGURATION = "OSCampus Configuration" language string:

the language string to translate

  • Translate the text between the double quotes to the right of the equation mark. In my example, I left the "OSCampus" text as is and translated just "Configuration":

translated string

  • Save your file and check your OSCampus interface. You should see your translations at work:

translation at work

  • Translate the rest of the language strings.
  • Repeat these steps for the rest of the OSCampus language files of your new language. 

Will my language folders and files be deleted when I update my Joomlashack extension?

The answer is No. Your newly created language folders and files will remain intact during your next Joomlashack extension update. The update will override only the folders and files that are part of the extension installation pack.