Translations

From DotProjectWiki

Jump to: navigation, search

PREREQUISITES & INSTALLATION

SYSTEM ADMIN MANUAL LINKS

Contents

1 What are Translations or Language Packs

They are files that you can download into your dotProject installation that change either the language or the jargon that is used on dotProject screens.

For example: German, Dutch, French, Chinese, Danish and many many other languages are available.

Alternatively, you may use English and prefer to create a fully Americanised version of English.

Also, you may have specific terminology or jargon used in your organisation - this could be as complex as changing all terms, through to preferring "Organisation" to "Company".[1]

The terminology language packs and translations is interchangeable throughout dotProject Forums and/or website - but we'll stick with Translations from here on in on this page.

2 Where can I find Translations

On our main website, http://www.dotproject.net there is a link to Language Packs, themes etc - you can follow that.

As at November 2006 we've also got a list of the most commonly accessed / latest uploaded Translations etc on the right hand side of the site - but as we infrequently change packages on the site, don't rely on that always being there - there will always be a link.

3 Installing a Translation

Installing a Translation will need you to have access to your dotProject file system.

3.1 Step One - Create a Directory

Create a language specific directory under the directory: dotproject/locales

This directory name should be your two character ISO language code - eg:

en = English
fr = French
it = Italian
ja = Japanese.

If you are unsure of the appropriate code please do a web search to locate this information (try http://en.wikipedia.org/wiki/Locale as a starting point)[2]

3.2 Step Two - Load the Translation Files

Copy / unpack the distribution from the download into the relevant locale directory

3.3 Step Three - Set the Locale

Set the appropriate translation for your system wide preferences Default User Preferences or allow individual users to select their preferred language Changing Personal Information.

3.4 Step Four - Log out and Log in

You may need to log out and log in again after you have changed a translation to activate.

4 Creating a Translation

Before starting, make sure that you check that somebody hasn't already done one - you could save yourself some time. Alternatively you might like to start with somebody else's translation and adapt to your own requirements.

Go to http://www.dotproject.net/ index.php?name=CmodsDownload to check.

4.1 Step One - Create a Directory

To add a new translation, firstly create a new directory under the dotproject/locales directory.

Make sure that you have the necessary file access / permissions to update these files (including the required directory permissions). You will need to be logged in as admin on your dotProject site.

4.2 Step Two - Create a locales.php file

As of Version 2.x of dotProject a lang.php file is required. Without this, your translation will not work. The lang.php file is used to provide the language identifiers.

The easiest way to get started is to copy the lang.php file from the 'en' directory to your new directory.

<?php
$dir = basename(dirname(__FILE__));
$LANGUAGE['aa_BB'] = array($dir, 'Language Name (in English)', 'Language name (in Language)', 'xxx');
?>
  • aa_BB is the iso 2 character language code 'aa', followed by the ISO 2 character country code 'BB'.
  • The first instance of the language name should be in English.
  • The second should be in the native language.
  • The last field 'xxx' is the Microsoft language code.

To find the locale details:

Microsoft : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_language_strings.asp

ISO 2 character country codes: http://www.theodora.com/country_digraphs.html

ISO 2 character language codes: http://www.oasis-open.org/cover/iso639a.html


As an example, from the Spanish locale:

<?php
// Language list for supported locales.
// This is used in the 2.0 version of dotproject to correctly identify Windows language
// support.  See the English version for details of its format.
$dir = basename(dirname(__FILE__));

$LANGUAGES['es_SP'] = array( $dir, 'Spanish', 'Español', 'esp');
$LANGUAGES['es_MX'] = array( $dir, 'Spanish (MX)', 'Español (MX)', 'esm');
?>

4.3 Accessing the Translation Interface

Logged in as a system admin on your dotProject installation, go to System Admin > Translation Management.

Change the 'Language' drop-down list to the name of the directory you just created.

Then select each module from the "Module" drop-down list and start translating by entering the appropriate "Language" version in the String: <your language> column.

DO NOT attempt to edit the INC files directly to create your translation - it won't work. Category:I Have Manually Edited INC Files but Translation Will Not Work

4.4 Activating the Translation

Once you have created a translation you should activate it as outlined in Installing a Translation

5 Problems with your Translation?

Once you have created a local translation then you need to set that Locale in Your System Wide Preferences: System Admin > System Config > Locale, also in System Admin > Default User Preferences and you may also have to change the individual settings at my Info > Edit Preferences.

You may have to log out and log back in again to trigger the preference re-set.

6 Distributing Your Translation

Generate a translation package by creating an archive (zip / tar etc) of the directory and all of it's contents - you will need to be sure that you have created an appropriate lang.php file)

That archive is then uploaded to www.dotproject.net - please send the zipped file to karen at dotproject dot net and I'll upload it in the general download area.

7 Footnotes

  1. ? We currently don't have any donated jargon packs - maybe somebody would consider sending in a "NGO" compatible translation, a "Health" compatible translation or something similar. Basically if you've used a translation for your site it might be handy for someone else. Share it with the community and you're doing your own bit to further dotProject
  2. ? If you are from a country that has multiple languages or uses a variant of a language (eg Portguese - Brazil) then the directory should be the 2 character language code _ 2 character country code eg PT_BR
Personal tools
System Administration
Conversion