From b6f0f89d0916d744fc6eb36f51ee708f9697e3a1 Mon Sep 17 00:00:00 2001 From: jervfors Date: Mon, 20 Feb 2006 08:46:59 +0000 Subject: [PATCH] Updating text about gettext files. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10773 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- doc/Development/plugin.txt | 46 +++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/doc/Development/plugin.txt b/doc/Development/plugin.txt index 163b5d7b..57cbe598 100644 --- a/doc/Development/plugin.txt +++ b/doc/Development/plugin.txt @@ -1158,7 +1158,7 @@ files. the top of any file that produces any output, place the following code (again, using "demo" as the plugin name): - bindtextdomain('demo', SM_PATH . 'plugins/demo/locale'); + bindtextdomain('demo', SM_PATH . 'locale'); textdomain('demo'); Now all output will be translated using your own custom locale files. @@ -1175,7 +1175,7 @@ files. bindtextdomain('squirrelmail', SM_PATH . 'locale'); textdomain('squirrelmail'); displayPageHeader($color, 'None'); - bindtextdomain('demo', SM_PATH . 'plugins/demo/locale'); + bindtextdomain('demo', SM_PATH . 'locale'); textdomain('demo'); Note that technically speaking, you only need to have one bindtextdomain @@ -1183,30 +1183,26 @@ files. since PHP installations without gettext compiled into them will not function properly if you do not. - 3. Finally, you just need to create your own locale. You should create - a directory structure like this in the plugin directory: + 3. Finally, you just need to create your own locale. There is a directory + structure like this in the locale directory: - demo - | - ------locale + locale + | + ------de_DE + | | + | ------LC_MESSAGES + | + ------ja_JP | - ------de_DE - | | - | ------LC_MESSAGES - | - ------ja_JP - | - ------LC_MESSAGES - - Create a directories such as de_DE for each language (de_DE is German, - ja_JP is Japanese, etc. - check the SquirrelMail locale directory for - a fairly comprehensive listing). Inside of each LC_MESSAGES directory - you should place two files, one with your translations in it, called - .po (in this case, "demo.po"), and one that is a compiled - version of the ".po" file, called .mo (in this case, - "demo.mo"). On most linux systems, there is a tool you can use to pull - out most of the strings that you need to have translated from your PHP - files into a sample .po file: + ------LC_MESSAGES + + There is a directories such as de_DE for each language (de_DE is German, + ja_JP is Japanese, etc.). Inside of each LC_MESSAGES directory you should + place two files; one with your translations in it, called .po + (in this case, "demo.po"), and one that is a compiled version of the ".po" + file, called .mo (in this case, "demo.mo"). On most linux + systems, there is a tool you can use to pull out most of the strings that + you need to have translated from your PHP files into a sample .po file: xgettext --keyword=_ -d -s -C *.php @@ -1247,7 +1243,7 @@ files. You should change the header to look something more like: - # Copyright (c) 1999-2005 The SquirrelMail Project Team + # Copyright (c) 1999-2006 The SquirrelMail Project Team # Roland Bauerschmidt , 1999. # $Id$ msgid "" -- 2.25.1