Lingua::ZH::Numbers::Currency - Converts currency values into their Chinese string equivalents


Lingua-ZH-Numbers documentation  | view source Contained in the Lingua-ZH-Numbers distribution.

Index


NAME

Top

Lingua::ZH::Numbers::Currency - Converts currency values into their Chinese string equivalents

VERSION

Top

This document describes version 0.01 of Lingua::ZH::Numbers::Currency, released November 23, 2002.

SYNOPSIS

Top

    # OO Style
    use Lingua::ZH::Numbers::Currency 'big5';
    my $shuzi = Lingua::ZH::Numbers::Currency->new( 123 );
    print $shuzi->get_string;

    my $lingyige_shuzi = Lingua::ZH::Numbers::Currency->new;
    $lingyige_shuzi->parse( 7340 );
    $chinese_string = $lingyige_shuzi->get_string;

    # Function style
    print currency_to_zh( 345 );	# automatically exported

    # Change output format
    Lingua::ZH::Numbers::Currency->charset('gb');

DESCRIPTION

Top

This module is a subclass of Lingua::ZH::Numbers; it provides a different set of characters used in currency numbers as used in financial transactions. All five representation systems (charsets): traditional, simplified, big5, gb and pinyin are still supported, although the pinyin variant is identical to the one used in Lingua::ZH::Numbers.

You can also use this module in a functionnal manner by invoking the currency_to_zh() function.

CAVEATS

Top

Fraction currency numbers are unsupported; you have to round the number before passing it for conversion, via int() or s/\.(.*)//.

SEE ALSO

Top

Lingua::ZH::Numbers::Currency

ACKNOWLEDGMENTS

Top

Dieter Simader for suggesting me to write this module.

AUTHORS

Top

Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Top


Lingua-ZH-Numbers documentation  | view source Contained in the Lingua-ZH-Numbers distribution.