larger smaller normal text version of this page

Formatting code for PhplistTranslation


show source only

[[PhplistTranslation Phplist Translation]]
----
=====Phplist Translation =====

Several people are currently working on translations of PHPlist. The translation is split into **frontend** and **backend**.

===Frontend===

The Frontend refers to all the pages viewable by the **public** (such as subscribe page, preferences page, etc.), as opposed to the administrators (such as attributes, send a message, etc.).

All frontend texts are currently stored in the **##texts##** directory that can be found in the ##lists## directory in the phplist distribution. To translate the texts (or to change the default ones), edit the **##english.inc##** file and save it to some other name. Then refer to this file in your config file.

These are the general steps to take when translating the frontend language file:
- Copy ##texts/english.inc## and rename it to ##your_language.inc##
- Translate only the text strings to the right of the equal symbol (=), and make sure the translated text strings are kept enclosed in single quotes and have a closing semi colon (;)
- If you need to use quotes in your text strings, you must place a backslash (\) in front of them, e.g. ##I{{color text="\'" c="red"}}m sending##
- Finally, make sure you define the character set encoding you used for the translation by changing the ''$strCharSet'' value. UTF-8 (unicode) is the preferred character set, so if you can encode your translation in UTF-8, you can set this value: ''$strCharSet = 'UTF-8';'' around line 5 of your language file.
- Upload your file back to the ##lists/texts/## folder
- Edit your ##config.php## file and set $language_module = "english.inc"; to ''$language_module = "your_language.inc";''


===Backend===

The Backend of PHPlist refers to all the pages viewable only by **administrators** (with the various functions: user, messages, system, etc.) Translating the admin pages is a bit more complex. You can now [[http://dev.phplist.com/langpack/ download]] the latest translation pack from the DEV site. It will contain three directories:
- **{{color text="lan" c="blue"}}**: this contains all the language strings for short bits of text on every page
- **{{color text="info" c="blue"}}**: this contains the "information" on each page, that is located at the top of the page
- **{{color text="help" c="blue"}}**: this contains content of help pages that are opened when clicking on a question mark (currently only in the "##send##" page)

In the [[http://dev.phplist.com/langpack/ language pack listing]], you will find the language packs for all languages that are currently in the SVN repository. If you want to update an existing language, you will want to check the existing language pack for your language first. The main language pack (in english) is the one without a language code. eg ** phplist-langpack-2.11.4.tgz**

NOTE: When new texts appear during development we will try to add them to the //end// of each file, clearly indicating that they are new.

The texts are in files that have exactly the same name as the file in the admin directory. They will contain code like:
%%(php)$lan = array(
'english text' => 'translated text',
);%%

==Include new language in admin interface==

To include the new language in the drop down menu of the admin backend, you will need to edit the file ##admin/language.php## file and uncomment the line with the language you translated, by removing the # at the beginning of the line, e.g.: ''#"it"=>array("Italian "," iso-8859-1, windows-1252 "),''


**{{color c="red" text="Important information"}}**

~-Do **not touch** the English text on the left of the arrow: **only change** the translated text on the right of the arrow.
~-If you use a **quote** in the translated text, make sure to **escape it** (\') otherwise the file will fail to parse. //Example//: ''don't'' must be written ''don\'t''
~-If you need to use **accents**, please **use HTML coding**. Example:
%%(html4strict) 'été ŕ Paris' must be written: 'été á Paris' %%

There are a few files that are more general than just the pages. These are ##common.php## and ##pagetitles.php##. ##common.php## has a few things that are used in many different pages (such as the menu items) and ##pagetitles.php## contain the translation of the pagetitle of every page.

**IMPORTANT:** If you are thinking about translating PHPlist, please make sure to check with the [[TranslatorsList translators mailinglist]] to see if anyone else is already doing that language.


===Checking your translation===

If you have access to [[DevelopmentEnvironment setting up your own development environment]] you can check your translation by loading the "checki18n" page. If not, you can send your translation to the mailinglist and we will try to add it as soon as we can. Once committed to Subversion, you can check the translation via the DEV website.

For example, [[http://dev.phplist.com/lists/admin/ log in to the DEV site]] change to your language and then load [[http://dev.phplist.com/lists/admin/?page=checki18n the checki18n page]] Anything in purple has been translated successfully, anything in red still requires a translation.


**Related topics**
- [[TranslatorsList Translators Mailinglist]]
- [[PhplistTranslationsFrontend Current frontend translations and updates]]


----
CategoryTranslation
Page was generated in 0.0262 seconds