php-doc-en/reference/intl/collator/create.xml
2013-06-18 05:36:30 +00:00

111 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="collator.create" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Collator::create</refname>
<refname>collator_create</refname>
<refpurpose>Create a collator</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>&style.oop;</para>
<methodsynopsis>
<modifier>public</modifier>
<modifier>static</modifier>
<type>Collator</type>
<methodname>Collator::create</methodname>
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
</methodsynopsis>
<para>
&style.procedural;
</para>
<methodsynopsis>
<type>Collator</type>
<methodname>collator_create</methodname>
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
</methodsynopsis>
<para>
The strings will be compared using the options already specified.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>locale</parameter></term>
<listitem>
<para>
The locale containing the required collation rules. Special values for
locales can be passed in - if null is passed for the locale, the
default locale collation rules will be used. If empty string ("") or
"root" are passed, <link xlink:href="&url.icu.uca;">UCA</link> rules will be used.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Return new instance of <classname>Collator</classname> object, or &null;
on error.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>collator_create</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$coll = collator_create( 'en_US' );
if( !isset( $coll ) ) {
printf( "Collator creation failed: %s\n", intl_get_error_message() );
exit( 1 );
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>Collator::__construct</function></member>
</simplelist>
</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
-->