Lingua::Flags(3)
π Lingua::Flags π
okay bestie, so Lingua::Flags is a Perl module that hands you lil' flag icons β¨ β and no, we're not talking about giant pixelated PNGs, we're talking small flag icons in a couple of different formats. tiny. cute. iconic. π
πΈ SYNOPSIS πΈ
it gives you small flag icons in different formats, fr fr:
use Lingua::Flags;
my $foo = as_html_img("PT");
print "<p>This is in $foo language</p>";
open GIF, ">image.gif";
print GIF as_gif("PT");
close GIF;
likeβ¦ look at that. one call, flag acquired. π
π«Ά DISCLAIMER π«Ά
okay so this is the part where we get real for a sec, because it matters:
it is literally impossible to map flags to languages. π languages cross countries. and countries cross languages. they're justβ¦ doing their own thing, overlapping, living their lives.
so what language should get the Spanish flag? Catalan? Castilian? something else entirely?? π and what flag do you even use for Afrikaans β South Africa or Namibia? like, there is no clean answer here, bestie.
the author tried to pick the more consensual flags, but ngl in some cases there are doubts. if you have better ideas, please correct him. π₯Ί
that said? the module is still useful. periodt. π
β¨ DESCRIPTION β¨
it's a module with small flag icons, that's the whole vibe. π
you can get them as a base64 inline HTML image, or as a gif image. pick your fighter. π¦
π FUNCTIONS π
as_html_img π
returns an inline HTML image.
for now, it just works with Netscape/Gecko based browsers. yes, we know. it's giving vintage. but it's what we have. π§
as_gif π
returns the gif code. normally you'd use it like this:
open GIF, ">image.gif";
print GIF as_gif("PT");
close GIF;
slay. gif on disk. πβ¨
π AUTHOR π
Alberto Simoes, "<ambs@cpan.org>" β the icon who made this happen. π«Ά
π BUGS π
found a bug? got a feature request? do not suffer in silence, bestie. report it to "bug-lingua-flags@rt.cpan.org", or slide through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-Flags>.
here's the deal: he will be notified, and then you'll automatically be notified of progress on your bug as changes get made. it's a whole little notification pipeline. communication! we love to see it. π
β COPYRIGHT & LICENSE β
Copyright 2007-2009 Alberto Simoes, all rights reserved.
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πͺ
and that's the whole page, bestie β perl v5.42.0, dated 2025-07-25, and yeah, it's Lingua::Flags(3). go forth and flag. πΈπ
π
π¦ where this page comes from
- fedora 43: perl-Lingua-Flags 0.07-42.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms