1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-24 07:02:08 +01:00
Files
Yoshinari Takaoka ff7f614e5e Generate gettext methodsynopses based on stubs
Patch contributed by Máté Kocsis <kocsismate@woohoolabs.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@351429 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-18 21:46:57 +00:00

106 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: ad2b7b45a27512d0e381b79641fecf6c713c4fb4 Maintainer: hirokawa Status: ready -->
<refentry xml:id="function.ngettext" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ngettext</refname>
<refpurpose>gettext の複数形版</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>ngettext</methodname>
<methodparam><type>string</type><parameter>singular</parameter></methodparam>
<methodparam><type>string</type><parameter>plural</parameter></methodparam>
<methodparam><type>int</type><parameter>count</parameter></methodparam>
</methodsynopsis>
<para>
複数形版の <function>gettext</function> です。
言語によっては、数量に応じていくつかの複数形が存在することがあります。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>singular</parameter></term>
<listitem>
<para>
単数形のメッセージ ID。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>plural</parameter></term>
<listitem>
<para>
複数形のメッセージ ID。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>count</parameter></term>
<listitem>
<para>
数 (件数など)。この数にあわせて翻訳を決定します。
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<parameter>singular</parameter> および <parameter>plural</parameter>
で表されるメッセージの、数 <parameter>count</parameter>
に対応する複数形を返します。
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>ngettext</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
setlocale(LC_ALL, 'cs_CZ');
printf(ngettext("%d window", "%d windows", 1), 1); // 1 okno
printf(ngettext("%d window", "%d windows", 2), 2); // 2 okna
printf(ngettext("%d window", "%d windows", 5), 5); // 5 oken
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- 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:"~/.phpdoc/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
-->