NAME
Lingua::SWE::Num2Word - Number to word conversion in Swedish
VERSION
version 0.2603300
Lingua::SWE::Num2Word is module for converting numbers into their representation in Swedish. Converts whole numbers from 0 up to 999 999 999.
Output text is encoded in UTF-8 encoding.
SYNOPSIS
use Lingua::SWE::Num2Word;
my $text = Lingua::SWE::Num2Word::num2sv_cardinal( 123 );
print $text || "sorry, can't convert this number into swedish language.";
my $ord = Lingua::SWE::Num2Word::num2sv_ordinal( 3 );
print $ord; # "tredje"
Functions Reference
- num2sv_cardinal (positional)
-
1 num number to convert => str converted string => undef if input number is not knownConvert number to text representation.
- num2sv_ordinal (positional)
-
1 num number to convert (1 .. 999_999_999) => str converted ordinal string => undef if input number is out of rangeConvert number to its Swedish ordinal text representation. Handles irregular forms (första, andra, tredje, etc.) and applies correct suffixes for regular forms.
- capabilities (void)
-
=> href hashref indicating supported conversion typesReturns a hashref of capabilities for this language module.
EXPORT_OK
- num2sv_cardinal
- num2sv_ordinal
AUTHORS
specification, maintenance:
Richard C. Jelinek E<lt>rj@petamem.comE<gt>
maintenance, coding (2025-present):
PetaMem AI Coding Agents
COPYRIGHT
Copyright (c) PetaMem, s.r.o. 2004-present
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as the Artistic License 2.0 or the BSD 2-Clause License. See the LICENSE file in the distribution for details.