How do i make a JCal Pro® translation?

For the purpose of this FAQ, let's assume that you want to make an Italian translation for JCal Pro® (even though one already exists).

To make a translation for JCal Pro®, you need a few simple things:

  1. Language name (eg. 'Italian')
  2. Language name in native language (eg. 'Italiano')
  3. Standard locale alternatives (comma-seperated) for a specific language (eg. 'it-IT','it','Italiano'). For reference, go to: http://www.php.net/manual/en/function.setlocale.php. See also the codes for the existing Joomla! translations.
  4. Language direction ('ltr' for Left to Right. 'rtl' for Right to Left languages such as Arabic).

Once you have this information, you can start to create the new language folder to represent your langauge.

  1. Using your favorite FTP client, connect to your Joomla site and browse to the following folder:

    • [ROOT]/components/com_jcalpro/langauges/
  2. Select a folder for one language that you understand, for example the 'english' folder. Use your FTP client to duplicate this folder and rename it to the Langauge name determined above (eg. italian).
  3. Open the newly created 'ilalian' folder to display the files within:

    • index.html (you can ignore this file)
    • index.php (this file contains all the translations)
  4. Using a UTF-8 compatible editor,edit index.php. The most critical thing you must first edit is the $lang_info array which starts at about line 37. For our italian example, replace the $lang_info data as shown below:

        'name' => 'Italian'
        ,'nativename' => 'Italiano'
        ,'locale' => array('it','Italiano')
        ,'charset' => 'UTF-8'
        ,'direction' => 'ltr'
        ,'author' => 'Your Name'
        ,'author_email' => 'your-email-address'
        ,'author_url' => 'your-url'
        ,'transdate' => 'current-date'
  5. The rest of the file contains the JCal Pro® language strings and the existing translations (in this case, all thestrings should be english as this was used as the source of the translation files). Replace the english string with the Italian translation. For example

        'yes' => 'Yes'

    should be replaced with:

        'yes' => 'Sì'
  6. Save the file as UTF-8 and update the file on your server.

Once you have completed and tested your new language file, please post a new thread on the forum being sure to attach a zip-archive of the new langauge. 

 
 

Get the latest updates on our extensions