larger smaller normal text version of this page
phpList Translation

PLEASE NOTE The documentation needs updating, but basically for the latest versions in the 2.11 range, all languages are now UTF-8, so it's best to always encode your languages with UTF-8

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 text strings (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.php 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\'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 ot the 'administrators interface', i.e., 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 download the latest translation pack from the DEV site. It will contain three directories:
  • lan: this contains all the language strings for short bits of text on every page
  • info: this contains the "information" on each page, that is located at the top of the page
  • help: this contains content of help pages that are opened when clicking on a question mark (currently only in the "send" page)

In the 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

January 2012: new translation system for the "lan" folder. Read more here PootleTranslation


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:
$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 "),


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:
'é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 page title of every page.

IMPORTANT: If you are thinking about translating phpList, please make sure to check with the translators mailinglist to see if anyone else is already working on that language.

Checking your translation


If you have access to 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, log in to the DEV site change to your language and then load the checki18n page Anything in purple has been translated successfully, anything in red still requires a translation.

Related topics


CategoryTranslation
Page was generated in 0.4477 seconds