aidan Sun Sep 12 22:12:25 2004 EDT
Modified files: /phpdoc/en/reference/strings/functions localeconv.xml Log: Made example less ridiculous Removed simplelist rows, livedocs doesn't support them (no need for it anyway) Added info describing n_sign_post and friend. (I'm not sure this is 100% correct, but seems to be from usernotes) http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/localeconv.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/strings/functions/localeconv.xml diff -u phpdoc/en/reference/strings/functions/localeconv.xml:1.5 phpdoc/en/reference/strings/functions/localeconv.xml:1.6 --- phpdoc/en/reference/strings/functions/localeconv.xml:1.5 Tue Jan 6 07:34:21 2004 +++ phpdoc/en/reference/strings/functions/localeconv.xml Sun Sep 12 22:12:24 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/strings.xml, last change in rev 1.68 --> <refentry id="function.localeconv"> <refnamediv> @@ -108,53 +108,24 @@ <row valign="top"> <entry>p_sign_posn</entry> <entry> - <simplelist columns="2" type="horiz"> - <member>0</member> - <member> - Parentheses surround the quantity and currency_symbol</member> - <member>1</member> - <member> - The sign string precedes the quantity and currency_symbol - </member> - <member>2</member> - <member> - The sign string succeeds the quantity and currency_symbol - </member> - <member>3</member> - <member> - The sign string immediately precedes the currency_symbol - </member> - <member>4</member> - <member> - The sign string immediately succeeds the currency_symbol - </member> + <simplelist> + <member>0 - Parentheses surround the quantity and currency_symbol</member> + <member>1 - The sign string precedes the quantity and currency_symbol</member> + <member>2 - The sign string succeeds the quantity and currency_symbol</member> + <member>3 - The sign string immediately precedes the currency_symbol</member> + <member>4 - The sign string immediately succeeds the currency_symbol</member> </simplelist> </entry> </row> <row valign="top"> <entry>n_sign_posn</entry> <entry> - <simplelist columns="2" type="horiz"> - <member>0</member> - <member> - Parentheses surround the quantity and currency_symbol - </member> - <member>1</member> - <member> - The sign string precedes the quantity and currency_symbol - </member> - <member>2</member> - <member> - The sign string succeeds the quantity and currency_symbol - </member> - <member>3</member> - <member> - The sign string immediately precedes the currency_symbol - </member> - <member>4</member> - <member> - The sign string immediately succeeds the currency_symbol - </member> + <simplelist> + <member>0 - Parentheses surround the quantity and currency_symbol</member> + <member>1 - The sign string precedes the quantity and currency_symbol</member> + <member>2 - The sign string succeeds the quantity and currency_symbol</member> + <member>3 - The sign string immediately precedes the currency_symbol</member> + <member>4 - The sign string immediately succeeds the currency_symbol</member> </simplelist> </entry> </row> @@ -163,12 +134,16 @@ </informaltable> </para> <para> + The <literal>n_sign_posn</literal>, and <literal>n_sign_posn</literal> contain a string + of formatting options. Each number representing one of the above listed conditions. + </para> + <para> The grouping fields contain arrays that define the way numbers - should be grouped. For example, the grouping field for the en_US + should be grouped. For example, the grouping field for the en_US locale, would contain a 2 item array with the values 3 and 3. The higher the index in the array, the farther left the grouping - is. If an array element is equal to CHAR_MAX, no further - grouping is done. If an array element is equal to 0, the + is. If an array element is equal to CHAR_MAX, no further + grouping is done. If an array element is equal to 0, the previous element should be used. </para> <example> @@ -176,33 +151,45 @@ <programlisting role="php"> <![CDATA[ <?php -setlocale(LC_ALL, "en_US"); - +setlocale(LC_ALL, 'en_US'); $locale_info = localeconv(); -echo "<pre>\n"; -echo "--------------------------------------------\n"; -echo " Monetary information for current locale: \n"; -echo "--------------------------------------------\n\n"; - -echo "int_curr_symbol: {$locale_info["int_curr_symbol"]}\n"; -echo "currency_symbol: {$locale_info["currency_symbol"]}\n"; -echo "mon_decimal_point: {$locale_info["mon_decimal_point"]}\n"; -echo "mon_thousands_sep: {$locale_info["mon_thousands_sep"]}\n"; -echo "positive_sign: {$locale_info["positive_sign"]}\n"; -echo "negative_sign: {$locale_info["negative_sign"]}\n"; -echo "int_frac_digits: {$locale_info["int_frac_digits"]}\n"; -echo "frac_digits: {$locale_info["frac_digits"]}\n"; -echo "p_cs_precedes: {$locale_info["p_cs_precedes"]}\n"; -echo "p_sep_by_space: {$locale_info["p_sep_by_space"]}\n"; -echo "n_cs_precedes: {$locale_info["n_cs_precedes"]}\n"; -echo "n_sep_by_space: {$locale_info["n_sep_by_space"]}\n"; -echo "p_sign_posn: {$locale_info["p_sign_posn"]}\n"; -echo "n_sign_posn: {$locale_info["n_sign_posn"]}\n"; -echo "</pre>\n"; +print_r($locale_info); ?> ]]> </programlisting> + &example.outputs; + <screen> +<![CDATA[ +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 + ( + ) + +) +]]> + </screen> </example> <para> The constant CHAR_MAX is also defined for the use mentioned above.