From cd1324b3abcfb26cfea89fcf32b376c7adc02650 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Fri, 6 Apr 2007 05:45:58 +0000 Subject: [PATCH] New extension that is part of Unicode and PHP 6. A couple of functions/files were renamed/moved from ref.unicode to here * i18n-loc-get-default.xml --> locale-get-default.xml * i18n-loc-set-default.xml --> locale-set-default.xml git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@233377 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../i18n/functions/locale_get_default.xml | 89 ++++++++++++ .../i18n/functions/locale_set_default.xml | 133 ++++++++++++++++++ reference/i18n/reference.xml | 57 ++++++++ 3 files changed, 279 insertions(+) create mode 100644 reference/i18n/functions/locale_get_default.xml create mode 100644 reference/i18n/functions/locale_set_default.xml create mode 100644 reference/i18n/reference.xml diff --git a/reference/i18n/functions/locale_get_default.xml b/reference/i18n/functions/locale_get_default.xml new file mode 100644 index 0000000000..8403367b1d --- /dev/null +++ b/reference/i18n/functions/locale_get_default.xml @@ -0,0 +1,89 @@ + + + + + locale_get_default + Get the default Locale + + + &reftitle.description; + + stringlocale_get_default + + + + This function returns the default Locale, which is used by PHP to localize + certain features. Please note that this isn't influenced by + setlocale or the system settings. + + + + + &reftitle.returnvalues; + + Returns a string with the current Locale. + + + + + &reftitle.examples; + + + A <function>locale_get_default</function> example + + +]]> + + &example.outputs; + + + + + + + + + &reftitle.seealso; + + + locale_set_default + + + + + + diff --git a/reference/i18n/functions/locale_set_default.xml b/reference/i18n/functions/locale_set_default.xml new file mode 100644 index 0000000000..43ec73038e --- /dev/null +++ b/reference/i18n/functions/locale_set_default.xml @@ -0,0 +1,133 @@ + + + + + locale_set_default + Set the default Locale + + + &reftitle.description; + + boollocale_set_default + stringname + + + Sets the default Locale for PHP programs. Please note that this has nothing + to do with setlocale nor with the system locale. + + + + + &reftitle.parameters; + + + + name + + + The new Locale name. A comprehensive list of the supported locales is + available at . + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + A <function>locale_set_default</function> example + + This example demonstrates a possible usage of + locale_set_default to localize the + sort functions. + + + +]]> + + &example.outputs; + + caçada + [1] => cacto + [2] => caramelo +) +]]> + + + If we didn't use the locale, PHP would sort the string using the ASCII + characters value, thus returning (wrongly): + + + cacto + [1] => caramelo + [2] => caçada +) +]]> + + + + + + + &reftitle.seealso; + + + locale_get_default + + + + + + diff --git a/reference/i18n/reference.xml b/reference/i18n/reference.xml new file mode 100644 index 0000000000..aa251693ae --- /dev/null +++ b/reference/i18n/reference.xml @@ -0,0 +1,57 @@ + + + + + + + + + i18n &Functions; + i18n + + +
+ &reftitle.intro; + + i18n support. + + + + This extension is still in development and it isn't available to public yet. + + +
+ +
+ &reftitle.required; + + The Unicode Extension. + +
+ +
+ &reference.i18n.functions; +
+ +