Lingua::ZH::Numbers - Converts numeric 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 - Converts numeric values into their Chinese string equivalents

VERSION

Top

This document describes version 0.04 of Lingua::ZH::Numbers, released September 8, 2004.

SYNOPSIS

Top

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

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

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

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

DESCRIPTION

Top

This module tries to convert a number into Chinese cardinal number. It supports decimals number, and five representation systems (charsets): traditional, simplified, big5, gb and pinyin. The first two are returned as unicode strings; hence they are only available for Perl 5.6 and later versions.

The interface conforms to the one defined in Lingua::EN::Number, but you can also use this module in a functionnal manner by invoking the number_to_zh() function.

SEE ALSO

Top

Lingua::EN::Numbers

ACKNOWLEDGMENTS

Top

Sean Burke 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.