1@c This file is part of the GNU gettext manual. 2@c Copyright (C) 1995-2020 Free Software Foundation, Inc. 3@c See the file gettext.texi for copying conditions. 4 5@node PHP 6@subsection PHP Hypertext Preprocessor 7@cindex PHP 8 9@table @asis 10@item RPMs 11mod_php4, mod_php4-core, phpdoc 12 13@item Ubuntu packages 14php 15 16@item File extension 17@code{php}, @code{php3}, @code{php4} 18 19@item String syntax 20@code{"abc"}, @code{'abc'} 21 22@item gettext shorthand 23@code{_("abc")} 24 25@item gettext/ngettext functions 26@code{gettext}, @code{dgettext}, @code{dcgettext}; starting with PHP 4.2.0 27also @code{ngettext}, @code{dngettext}, @code{dcngettext} 28 29@item textdomain 30@code{textdomain} function 31 32@item bindtextdomain 33@code{bindtextdomain} function 34 35@item setlocale 36Programmer must call @code{setlocale (LC_ALL, "")} 37 38@item Prerequisite 39--- 40 41@item Use or emulate GNU gettext 42use 43 44@item Extractor 45@code{xgettext} 46 47@item Formatting with positions 48@code{printf "%2\$d %1\$d"} 49 50@item Portability 51On platforms without gettext, the functions are not available. 52 53@item po-mode marking 54--- 55@end table 56 57An example is available in the @file{examples} directory: @code{hello-php}. 58