mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-29 03:33:21 +02:00
624d3a299c
Generate ext/intl methodsynopses based on stubs (Locale) Weirdly part of it was propagated in the revcheck script with the incorrect hash as to recent
138 lines
3.8 KiB
XML
Executable File
138 lines
3.8 KiB
XML
Executable File
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 6fcf444471febbbc7ad0a52f16303f6957362447 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<!-- CREDITS: DAnnebicque -->
|
|
<refentry xml:id="locale.parselocale" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>Locale::parseLocale</refname>
|
|
<refname>locale_parse</refname>
|
|
<refpurpose>Retourne les sous-éléments de la locale</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<para>
|
|
&style.oop;
|
|
</para>
|
|
<methodsynopsis role="oop">
|
|
<modifier>public</modifier> <modifier>static</modifier> <type class="union"><type>array</type><type>null</type></type><methodname>Locale::parseLocale</methodname>
|
|
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
&style.procedural;
|
|
</para>
|
|
<methodsynopsis role="procedural">
|
|
<type class="union"><type>array</type><type>null</type></type><methodname>locale_parse</methodname>
|
|
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Retourne un tableau de paires clé-valeur pour les éléments du sous-tag
|
|
de la locale.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>locale</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La locale dont il faut extraire le tableau. Notez que 'variant' et
|
|
'private' peuvent prendre jusqu'à 15 valeurs au maximum, alors que
|
|
'extlang' peut prendre jusqu'à 3 valeurs.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne un tableau contenant la liste des paires clé-valeur, où les
|
|
clés sont les noms des éléments, et les valeurs sont leur valeur associée.
|
|
Le tableau est ordonné de la même manière que les éléments dans la locale,
|
|
e.g. si les variantes sont '-varX-varY-varZ' alors le tableau retournée
|
|
contiendra variant0=>varX , variant1=>varY ,
|
|
variant2=>varZ, etc.
|
|
</para>
|
|
<para>
|
|
Retourne &null; quand la taille de <parameter>locale</parameter> dépasse
|
|
<constant>INTL_MAX_LOCALE_LEN</constant>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Exemple avec <function>locale_parse</function>, procédural</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$arr = locale_parse('sl-Latn-IT-nedis');
|
|
if ($arr) {
|
|
foreach ($arr as $key => $value) {
|
|
echo "$key : $value , ";
|
|
}
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
<example>
|
|
<title>Exemple avec <function>locale_parse</function>, POO</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$arr = Locale::parseLocale('sl-Latn-IT-nedis');
|
|
if ($arr) {
|
|
foreach ($arr as $key => $value) {
|
|
echo "$key : $value , ";
|
|
}
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
language : sl , script : Latn , region : IT , variant0 : NEDIS ,
|
|
]]>
|
|
</screen>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>locale_compose</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
|
|
-->
|