Template::Plugin::Komma - TT2 plugin to commify numbers (German format)
[% USE Komma %] Prozent: [% 12.3 | komma %] % Einwohner: [% 1200000 | komma0 %] Preis: [% 44.9 | komma2 %] EUR # Output: Prozent: 12,3 % Einwohner: 1.200.000 Preis 44,90 EUR
This plugin is the German version of Template::Plugin::Comma. It installs 3 filters: komma, komma0 and komma2.
komma
komma0
komma2
komma outputs the number with ',' as decimal point and '.' as thousand separator.
komma0 rounds the number to an integer and outputs the number with thousend separators.
komma2 rounds the number to 2 digits after the point (Nachkommastellen).
The interface is a little bit different to Template::Plugin::Comma, komma expects a number as parameter (comma can be feeded with a whole line of text and only the numbers are converted.)
comma
Uwe Voelker <uwe.voelker@gmx.de>
Based on Template::Plugin::Comma by Yoshiki Kurihara <kurihara@cpan.org> and Tatsuhiko Miyagawa <miyagawa@bulknews.net>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Template, Template::Plugin::Comma, Template::Plugin::Number::Format
To install Template::Plugin::Komma, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::Komma
CPAN shell
perl -MCPAN -e shell install Template::Plugin::Komma
For more information on module installation, please visit the detailed CPAN module installation guide.