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 + + + + + +