mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 14:28:56 +00:00
113 lines
2.6 KiB
XML
113 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="locale.getdefault" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>Locale::getDefault</refname>
|
|
<refname>locale_get_default</refname>
|
|
<refpurpose>Gets the default locale value from the INTL global 'default_locale'</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<para>
|
|
&style.oop;
|
|
</para>
|
|
<methodsynopsis role="oop">
|
|
<modifier>public</modifier> <modifier>static</modifier> <type>string</type><methodname>Locale::getDefault</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
&style.procedural;
|
|
</para>
|
|
<methodsynopsis role="procedural">
|
|
<type>string</type><methodname>locale_get_default</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Gets the default locale value. At the PHP initialization this value is set
|
|
to 'intl.default_locale' value from &php.ini; if that value exists or
|
|
from ICU's function uloc_getDefault().
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
The current runtime locale
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title><function>locale_get_default</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
ini_set('intl.default_locale', 'de-DE');
|
|
echo locale_get_default();
|
|
echo '; ';
|
|
locale_set_default('fr');
|
|
echo locale_get_default();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
<example>
|
|
<title>OO example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
ini_set('intl.default_locale', 'de-DE');
|
|
echo Locale::getDefault();
|
|
echo '; ';
|
|
Locale::setDefault('fr');
|
|
echo Locale::getDefault();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
de-DE; fr
|
|
]]>
|
|
</screen>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>locale_set_default</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
|
|
-->
|