User:Will Pittenger/templates/GetCountryFlag

From Wikipedia, the free encyclopedia

Usage[edit]

Pass "USA" for the United States or a Top Level domain code (minus the period) for other countries. (USA is the only recognized code for the US in interests of space.)

Note that while {{User:Will Pittenger/templates/GetCountryName}} returns a link or text containing a link, GetCountryFlag only returns the Image page name (without the "Image:" prefix attached). This allows you to specify the thumb size as needed and control the description text. Hence, passing "USA" returns "Flag of the United States.svg".

Also, since Antarctica and several others don't have flags, they were omitted even though they do have top level domain codes.

Finally, some flags may appear to be duplicates. However, they probably just use the flag of the nation that governs them. Please check {{User:Will Pittenger/templates/GetCountryName}} before concluding two entries are in fact duplicates. Please report any true duplicates (or any other error) on my talk page. Thanks.

Parameters[edit]

Name Purpose Default
{{{1}}} A code from the table below. This parameter is also known as {{{code}}}.

Supported nations[edit]

Enter this code Get this image back.
If you see text here rather than an image,
that nation is not yet supported.
USA
ac
ad
ae
af
ag
ai
al
am
an
ao
ar
as
at
au
aw
ax
az
ba
bb
bd
be
bf
bg
bh
bi
bj
bm
bn
bo
br
bs
bt
bw
by
bz
ca
cc
cd
cf
cg
ch
ci
ck
cl
cm
cn
co
cr
cu
cv
cx
cy
cz
de
dj
dk
dm
do
dz
ec
ee
eg
er
es
et
eu
fi
fj
fk
fm
fo
fr
ga
gd
ge
gf 40px
gg
gh
gi
gl
gm
gn
gp
gq
gr
gs
gt
gu
gw
gy
hk
hn
hr
ht
hu
id
ie
il
im
in
io
iq
ir
is
it
je
jm
jo
jp
ke
kg
kh
ki
km
kn
kr
kw
ky
kz
la
lb
lc
li
lk
lr
ls
lt
lu
lv
ly
ma
mc
md
me
mg
mh
mk
ml
mm
mn
mo
mp
mq
mr
ms
mt
mu
mv
mw
mx
my
mz
na
nc
ne
nf
ng
ni
nl
no
np
nr
nu
nz
om
pa
pe
pf
pg
ph
pk
pl
pm
pn
pr
ps
pt
pw
py
qa
ro
rs
ru
rw
sa
sb
sc
sd
se
sg
sh
si
sj
sk
sl
sm
sn
sr
st
su
sv
sy
sz
tc
td
tf
tg
th
tj
tk
tl
tm
tn
to
tp
tr
tt
tv
tw
tz
ua
ug
uk
um
uy
uz
va
vc
ve
vg
vi
vn
vu
wf
ws
ye
yt
yu
za
zm
zw