From 801c63a34e4859d509c1533899d6b181b0117d2c Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Wed, 18 Sep 2002 07:56:17 +0000 Subject: [PATCH] documentation for new optional calling convention git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@96031 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/setlocale.xml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/reference/strings/functions/setlocale.xml b/reference/strings/functions/setlocale.xml index b7bb9bb148..83e55e6bc0 100644 --- a/reference/strings/functions/setlocale.xml +++ b/reference/strings/functions/setlocale.xml @@ -1,5 +1,5 @@ - + @@ -12,6 +12,12 @@ stringsetlocale mixedcategory stringlocale + string... + + + stringsetlocale + mixedcategory + arraylocale Category is a named constant (or string) @@ -60,9 +66,17 @@ categories, or from "LANG". - If locale is zero or "0", the locale setting + If locale is zero or "0", the locale setting is not affected, only the current setting is returned. + + If locale is an array or followed by additional + parameters then each array element or parameter is tried to be set as + new locale until success. This is usefull if a locale is known under + different names on different systems or for providing a fallback + for a possibly not available locale. + Passing multiple locales is not available before PHP 4.3 + Setlocale returns the new current locale, or &false; if the locale functionality is not implemented in the platform, the specified @@ -80,6 +94,10 @@ /* Output: vrijdag 22 december 1978 */ echo strftime ("%A %e %B %Y", mktime (0, 0, 0, 12, 22, 1978)); + + /* try different possible locale names for german */ + $loc_de = setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); + echo "Preferred locale for german on this system is '$loc_de'; ?> ]]>