php-doc-en/reference/intl/locale/get-script.xml
Máté Kocsis 6fcf444471
Generate ext/intl methodsynopses based on stubs (Locale)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-910.
2021-09-05 14:58:44 +02:00

115 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="locale.getscript" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Locale::getScript</refname>
<refname>locale_get_script</refname>
<refpurpose>Gets the script for the input 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>string</type><type>null</type></type><methodname>Locale::getScript</methodname>
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
</methodsynopsis>
<para>
&style.procedural;
</para>
<methodsynopsis role="procedural">
<type class="union"><type>string</type><type>null</type></type><methodname>locale_get_script</methodname>
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
</methodsynopsis>
<para>
Gets the script for the input locale.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>locale</parameter></term>
<listitem>
<para>
The locale to extract the script code from
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The script subtag for the locale or &null; if not present
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>locale_get_script</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo locale_get_script('sr-Cyrl');
?>
]]>
</programlisting>
</example>
<example>
<title>OO example</title>
<programlisting role="php">
<![CDATA[
<?php
echo Locale::getScript('sr-Cyrl');
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
Cyrl
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>locale_get_primary_language</function></member>
<member><function>locale_get_region</function></member>
<member><function>locale_get_all_variants</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
-->