mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-17 01:18:55 +00:00

removing the others git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78562 c90b9560-bf6c-de11-be94-00142212c4b1
246 lines
7.8 KiB
XML
246 lines
7.8 KiB
XML
<!-- D O N O T E D I T T H I S F I L E ! ! !
|
|
|
|
it is still here for historical reasons only
|
|
(as translators may need to check old revision diffs)
|
|
|
|
if you want to change things documented in this file
|
|
you should now edit the files found under en/reference
|
|
instead -->
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.22 $ -->
|
|
<reference id="ref.gettext">
|
|
<title>Gettext</title>
|
|
<titleabbrev>gettext</titleabbrev>
|
|
|
|
<partintro>
|
|
<simpara>
|
|
The gettext functions implement a NLS (Native Language Support)
|
|
API which can be used to internationalize your PHP applications.
|
|
Please see the gettext documentation from your system for a thorough
|
|
explanation of these functions.
|
|
</simpara>
|
|
</partintro>
|
|
|
|
<refentry id="function.bindtextdomain">
|
|
<refnamediv>
|
|
<refname>bindtextdomain</refname>
|
|
<refpurpose>Sets the path for a domain</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>bindtextdomain</methodname>
|
|
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
The <function>bindtextdomain</function> function sets the path
|
|
for a domain.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id='function.bind-textdomain-codeset'>
|
|
<refnamediv>
|
|
<refname>bind_textdomain_codeset</refname>
|
|
<refpurpose>
|
|
Specify the character encoding in which the messages from the
|
|
DOMAIN message catalog will be returned
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>bind_textdomain_codeset</methodname>
|
|
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>codeset</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
&warn.undocumented.func;
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.dcgettext">
|
|
<refnamediv>
|
|
<refname>dcgettext</refname>
|
|
<refpurpose>Overrides the domain for a single lookup</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>dcgettext</methodname>
|
|
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>message</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>category</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This function allows you to override the current domain for a
|
|
single message lookup. It also allows you to specify a
|
|
<parameter>category</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id='function.dcngettext'>
|
|
<refnamediv>
|
|
<refname>dcngettext</refname>
|
|
<refpurpose>Plural version of dcgettext</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>dcngettext</methodname>
|
|
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>msgid1</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>msgid2</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>n</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>category</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
&warn.undocumented.func;
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.dgettext">
|
|
<refnamediv>
|
|
<refname>dgettext</refname>
|
|
<refpurpose>Override the current domain</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>dgettext</methodname>
|
|
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>message</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
The <function>dgettext</function> function allows you to override
|
|
the current domain for a single message lookup.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id='function.dngettext'>
|
|
<refnamediv>
|
|
<refname>dngettext</refname>
|
|
<refpurpose>Plural version of dgettext</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>dngettext</methodname>
|
|
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>msgid1</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>msgid2</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>n</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
&warn.undocumented.func;
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.gettext">
|
|
<refnamediv>
|
|
<refname>gettext</refname>
|
|
<refpurpose>Lookup a message in the current domain</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>gettext</methodname>
|
|
<methodparam><type>string</type><parameter>message</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This function returns a translated string if one is found in the
|
|
translation table, or the submitted message if not found. You may
|
|
use an underscore character as an alias to this function.
|
|
</para>
|
|
<example>
|
|
<title><function>gettext</function>-check</title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
<?php
|
|
// Set language to German
|
|
putenv ("LANG=de");
|
|
|
|
// Specify location of translation tables
|
|
bindtextdomain ("myPHPApp", "./locale");
|
|
|
|
// Choose domain
|
|
textdomain ("myPHPApp");
|
|
|
|
// Print a test message
|
|
print (gettext ("Welcome to My PHP Application"));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ngettext">
|
|
<refnamediv>
|
|
<refname>ngettext</refname>
|
|
<refpurpose>Plural version of gettext</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>ngettext</methodname>
|
|
<methodparam><type>string</type><parameter>msgid1</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>msgid2</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>n</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
&warn.undocumented.func;
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.textdomain">
|
|
<refnamediv>
|
|
<refname>textdomain</refname>
|
|
<refpurpose>Sets the default domain</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>textdomain</methodname>
|
|
<methodparam><type>string</type><parameter>text_domain</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This function sets the domain to search within when calls are
|
|
made to <function>gettext</function>, usually the named after an
|
|
application. The previous default domain is returned.
|
|
Call it with &null; as parameter to get the current setting without
|
|
changing it.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
</reference>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|