From 536b7ac688d57d3775d30e78b6bc94593f74247b Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Tue, 23 Aug 2011 22:38:36 +0000 Subject: [PATCH] config.inc.php: - several comments for the language_hook function: - x_* naming policy for custom texts - note that custom texts must appear in all blocks - note that translation fixes should be reported in the bugtracker git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1177 a1433add-5e2c-0410-b055-b7f2511e0802 --- config.inc.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/config.inc.php b/config.inc.php index 96a673c9..b6699b58 100644 --- a/config.inc.php +++ b/config.inc.php @@ -48,19 +48,33 @@ $CONF['language_hook'] = ''; Called if $CONF['language_hook'] == '' Allows to add or override $PALANG interface texts. + If you add new texts, please always prefix them with 'x_' (for example + $PALANG['x_mytext'] = 'foo') to avoid they clash with texts that might be + added to languages/*.lang in future versions of PostfixAdmin. + + Please also make sure that all your added texts are included in all + sections - that includes all 'case "XY":' sections and the 'default:' + section (for users that don't have any of the languages specified + in the 'case "XY":' section). + Usually the 'default:' section should contain english text. + + If you modify an existing text/translation, please consider to report it + to the bugtracker on http://sf.net/projects/postfixadmin so that all users + can benefit from the corrected text/translation. + Returns: modified $PALANG array */ /* function language_hook($PALANG, $language) { switch ($language) { case "de": - $PALANG['whatever'] = 'foo'; + $PALANG['x_whatever'] = 'foo'; break; - case "en": - $PALANG['whatever'] = 'bar'; + case "fr": + $PALANG['x_whatever'] = 'bar'; break; default: - $PALANG['whatever'] = 'foobar'; + $PALANG['x_whatever'] = 'foobar'; } return $PALANG;