Locale::MakePhrase::Numeric - Numeric translation/stringification
This module provides the functionality to translate and/or stringify a numeric, into something suitable for the string being translated.
The following class-functions are provided:
This class-function implements the stringification of a number to a suitable output format. The $options parameter is used to control the formatting behaviour:
numeric_format
The formatting appled to the number; this must be an array reference containing 4 elements:
decimal seperator
thousand's seperator
when the value is negative, the symbol shown to the left of the number
when the value is negative, the symbol shown to the right of the number
width
Set the number of characters used in the output.
precision
Set the maximum number of decimal places processed.
fixed
Set this to true to make the output use a fixed number of decimal places, irrespective if the values are all zeros. Use this in conjunction with the precision setting.
scientific
Set this value to true to make the number show exponential notation.
leading_zeros
Set this to true to make the output display zeros; combine this with the width setting.
If the number is purely an integer, you have not set the fixed or scientific settings, we try to keep the number from turning into its scientific notation (ie: we try to stop big numbers turning into something like 1.04E+09).
To install Locale::MakePhrase, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Locale::MakePhrase
CPAN shell
perl -MCPAN -e shell install Locale::MakePhrase
For more information on module installation, please visit the detailed CPAN module installation guide.