mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
tips for windows added
win specific example typos fixed bugfix #24518 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@134470 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e203cfdcfd
commit
7b1a1fa844
1 changed files with 37 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.setlocale">
|
||||
<refnamediv>
|
||||
|
@ -66,8 +66,8 @@
|
|||
categories, or from "LANG".
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>locale</parameter> is zero or <literal>"0"</literal>, the locale setting
|
||||
is not affected, only the current setting is returned.
|
||||
If <parameter>locale</parameter> is &null; or <literal>"0"</literal>,
|
||||
the locale setting is not affected, only the current setting is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>locale</parameter> is an array or followed by additional
|
||||
|
@ -83,7 +83,7 @@
|
|||
</note>
|
||||
<para>
|
||||
Setlocale returns the new current locale, or &false; if the locale
|
||||
functionality is not implemented in the platform, the specified
|
||||
functionality is not implemented on your platform, the specified
|
||||
locale does not exist or the category name is invalid.
|
||||
An invalid category name also causes a warning message. Category/locale
|
||||
names can be found in <ulink url="&url.rfc;1766">RFC 1766</ulink>
|
||||
|
@ -96,6 +96,19 @@
|
|||
what the system setlocale function returns.
|
||||
</para>
|
||||
</note>
|
||||
<tip>
|
||||
<para>
|
||||
Windows users will find usefull information about
|
||||
<parameter>locale</parameter> strings at Microsoft's msdn website.
|
||||
Supported language strings can be found
|
||||
<ulink url="&url.setlocale.lang.win32;">here</ulink> and supported
|
||||
country/region strings <ulink url="&url.setlocale.country.win32;">
|
||||
here</ulink>. Windows systems support the three letter codes for
|
||||
country/region specified by <literal>ISO 3166-Alpha-3</literal>,which
|
||||
can be found at this <ulink url="&url.iso-3166-3;">Unicode website
|
||||
</ulink>.
|
||||
</para>
|
||||
</tip>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>setlocale</function> Examples</title>
|
||||
|
@ -112,6 +125,26 @@ echo strftime ("%A %e %B %Y", mktime (0, 0, 0, 12, 22, 1978));
|
|||
$loc_de = setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
echo "Preferred locale for german on this system is '$loc_de'";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>setlocale</function> Examples for Windows</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Set locale to Dutch */
|
||||
setlocale (LC_ALL, 'nld_nld');
|
||||
|
||||
/* Output: vrijdag 22 december 1978 */
|
||||
echo strftime ("%A %B %Y", mktime (0, 0, 0, 12, 22, 1978));
|
||||
|
||||
/* try different possible locale names for german as of PHP 4.3.0 */
|
||||
$loc_de = setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'deu_deu');
|
||||
echo "Preferred locale for german on this system is '$loc_de'";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue