Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: PHP localeconv() does not return a reasonable array ? |
|
Author |
|
rockjock
Joined: 25 Mar 2011 Posts: 8
|
Posted: Mon 10 Jun '13 17:01 Post subject: PHP localeconv() does not return a reasonable array ? |
|
|
Splitted from www.apachelounge.com/viewtopic.php?p=24858
I have trouble getting this snippet to run properly with the PHP 5.4.16 x64 build:
setlocale(LC_ALL,"French_France");
print_r(localeconv());
Array
(
[decimal_point] => .
[thousands_sep] =>
[int_curr_symbol] =>
[currency_symbol] =>
[mon_decimal_point] =>
[mon_thousands_sep] =>
[positive_sign] =>
[negative_sign] =>
[int_frac_digits] => 127
[frac_digits] => 127
[p_cs_precedes] => 127
[p_sep_by_space] => 127
[n_cs_precedes] => 127
[n_sep_by_space] => 127
[p_sign_posn] => 127
[n_sign_posn] => 127
[grouping] => Array
(
)
[mon_grouping] => Array
(
)
) |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 10 Jun '13 17:18 Post subject: |
|
|
rockjock wrote: |
setlocale(LC_ALL,"French_France");
|
fra_fra is correct. See http://msdn.microsoft.com/en-us/library/39cwe7zf%28v=vs.90%29.aspx
try
Code: |
<?php
setlocale(LC_ALL, 'fra_fra');
echo strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));
$loc_de = setlocale(LC_ALL, 'fr_FR@euro', 'fr_FR', 'fra_fra');
echo "Preferred locale for frensh on this system is '$loc_de'";
?>
|
|
|
Back to top |
|
rockjock
Joined: 25 Mar 2011 Posts: 8
|
Posted: Mon 10 Jun '13 17:53 Post subject: |
|
|
strftime() returns correct values. Unfortunately localeconv() does not return a reasonable array. |
|
Back to top |
|
|
|
|
|
|