1 Here are the beginnings of some coding guidelines for PhpWiki.
3 ! I18N: Using gettext()
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.
9 It is important that the argument of ''gettext()'' be a constant string
10 literal, in double quotes (").
12 OKAY: gettext("This is a message.");
13 OKAY: gettext ("Fazool.");
14 OKAY: sprintf(gettext("Hello %s"), $name);
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);