]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - README.coding
Re-make *.{po,mo} files.
[SourceForge/phpwiki.git] / README.coding
1 Here are the beginnings of some coding guidelines for PhpWiki.
2
3 ! I18N: Using gettext()
4
5 String literals which end up making it into the HTML output should be wrapped
6 with a call to ''gettext()''.  This allows translations to be substituted when 
7 PhpWiki is run in non-english environments.
8
9 It is important that the argument of ''gettext()'' be a constant string
10 literal, in double quotes (").
11
12  OKAY:  gettext("This is a message.");
13  OKAY:  gettext ("Fazool."); 
14  OKAY:  sprintf(gettext("Hello %s"), $name);
15
16  BAD:   gettext('This will be ignored by xgettext.');
17  BAD:   gettext("Howdy" . ", wazoo");
18  BAD:   gettext("Hello $name");
19  BAD:   define("MES", "howdy");  gettext(MES);
20