<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Gettext Functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="函数参考" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="geoip_region_by_name" HREF="function.geoip-region-by-name.html"><LINK REL="NEXT" TITLE="bind_textdomain_codeset" HREF="function.bind-textdomain-codeset.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.geoip-region-by-name.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.bind-textdomain-codeset.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.gettext" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >XLIX. Gettext Functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN63651" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="gettext.intro" >简介</A ></H1 ><P > The gettext functions implement an NLS (Native Language Support) API which can be used to internationalize your PHP applications. Please see the gettext documentation for your system for a thorough explanation of these functions or view the docs at <A HREF="http://www.gnu.org/software/gettext/manual/gettext.html" TARGET="_top" >http://www.gnu.org/software/gettext/manual/gettext.html</A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="gettext.requirements" >需求</A ></H1 ><P > To use these functions you must download and install the GNU gettext package from <A HREF="http://www.gnu.org/software/gettext/gettext.html" TARGET="_top" >http://www.gnu.org/software/gettext/gettext.html</A > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="gettext.installation" >安装</A ></H1 ><P > To include GNU gettext support in your PHP build you must add the option <CODE CLASS="option" >--with-gettext[=DIR]</CODE > where DIR is the gettext install directory, defaults to <TT CLASS="filename" >/usr/local</TT >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="gettext.configuration" >运行时配置</A ></H1 ><P >本扩展模块在 <TT CLASS="filename" >php.ini</TT > 中未定义任何配置选项。</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="gettext.resources" >资源类型</A ></H1 ><P >本扩展模块未定义任何资源类型。</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="gettext.constants" >预定义常量</A ></H1 ><P >本扩展模块未定义任何常量。</P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >目录</B ></DT ><DT ><A HREF="function.bind-textdomain-codeset.html" >bind_textdomain_codeset</A > -- Specify the character encoding in which the messages from the DOMAIN message catalog will be returned</DT ><DT ><A HREF="function.bindtextdomain.html" >bindtextdomain</A > -- Sets the path for a domain</DT ><DT ><A HREF="function.dcgettext.html" >dcgettext</A > -- Overrides the domain for a single lookup</DT ><DT ><A HREF="function.dcngettext.html" >dcngettext</A > -- Plural version of dcgettext</DT ><DT ><A HREF="function.dgettext.html" >dgettext</A > -- Override the current domain</DT ><DT ><A HREF="function.dngettext.html" >dngettext</A > -- Plural version of dgettext</DT ><DT ><A HREF="function.gettext.html" >gettext</A > -- Lookup a message in the current domain</DT ><DT ><A HREF="function.ngettext.html" >ngettext</A > -- Plural version of gettext</DT ><DT ><A HREF="function.textdomain.html" >textdomain</A > -- Sets the default domain</DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.geoip-region-by-name.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.bind-textdomain-codeset.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >geoip_region_by_name</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >bind_textdomain_codeset</TD ></TR ></TABLE ></DIV ></BODY ></HTML >