From fb4907aa32991d8c058bf2e728054153a6494073 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sun, 25 Sep 2005 15:46:02 +0000 Subject: [PATCH] add 2 new unicode functions git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@196911 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/i18n-loc-get-default.xml | 89 ++++++++++++ .../functions/i18n-loc-set-default.xml | 133 ++++++++++++++++++ 2 files changed, 222 insertions(+) create mode 100644 reference/unicode/functions/i18n-loc-get-default.xml create mode 100644 reference/unicode/functions/i18n-loc-set-default.xml diff --git a/reference/unicode/functions/i18n-loc-get-default.xml b/reference/unicode/functions/i18n-loc-get-default.xml new file mode 100644 index 0000000000..5d295bd824 --- /dev/null +++ b/reference/unicode/functions/i18n-loc-get-default.xml @@ -0,0 +1,89 @@ + + + + + i18n_loc_get_default + Get the default Locale + + + &reftitle.description; + + stringi18n_loc_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>i18n_loc_get_default</function> example + + +]]> + + &example.outputs; + + + + + + + + + &reftitle.seealso; + + + i18n_loc_set_default + + + + + + diff --git a/reference/unicode/functions/i18n-loc-set-default.xml b/reference/unicode/functions/i18n-loc-set-default.xml new file mode 100644 index 0000000000..64134bc61b --- /dev/null +++ b/reference/unicode/functions/i18n-loc-set-default.xml @@ -0,0 +1,133 @@ + + + + + i18n_loc_set_default + Set the default Locale + + + &reftitle.description; + + booli18n_loc_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>i18n_loc_set_default</function> example + + This example demonstrates a possible usage of + i18n_loc_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; + + + i18n_loc_get_default + + + + + +