Template::Plugin::Lingua::EN::Numbers - TT2 interface to Lingua::EN::Numbers module
[% USE Lingua.EN.Numbers -%] [% checksum = content FILTER num2en -%] [% checksum = content FILTER num2en_ordinal -%] [% checksum = content FILTER year2en -%] [% checksum = content FILTER ordinate -%] [% checksum = content.num2en -%] [% checksum = content.num2en_ordinal -%] [% checksum = content.year2en -%] [% checksum = content.ordinate -%]
The Lingua::EN::Numbers Template Toolkit plugin provides access to the Lingua::EN::Numbers, Lingua::EN::Numbers::Years and Lingua::EN::Numbers::Ordinate module functions, to translate number values to their names.
When you invoke
[% USE Lingua.EN.Numbers %]
the following filters (and vmethods of the same name) are installed into the current context:
Converts a number (such as 123) into English text (such as "one hundred and twenty-three").
Converts a number into the ordinal form in words, so 54 becomes "fifty-fourth".
Converts a number (such as 1984) into English text (such as "nineteen eighty-four").
Converts a number (such as 3) into ordinal form (such as "3rd").
Barbie <email@example.com> 2014
Andrew Ford for writing Template::Plugin::Lingua::EN::Inflect, which inspired this module.
Neil Bowers for taking over Sean M Burke's Lingua::EN::Numbers(::(Years|Ordinate))?, modules, and giving me the idea to add to my new Template Toolkit plugins collection, which I've recently taken over from Andrew Ford.
Copyright (C) 2014-2015 Barbie for Miss Barbell Productions.
This distribution is free software; you can redistribute it and/or modify it under the Artistic Licence v2.