Template:CountryAbbr2

<!-- -- --NOTES: -- -- A1: This template is used to find a 2-letter country --    code (plus 2-letter region code) by matching each --    country-flag spanned image+wikilink. However, the --    original implementation transcluded over 560 flag --    or country-data templates, so the code has been --    simplified to omit specialized flag templates and --    omit rare flags not used by a caller page. -- -- D2: The flag+wikilink data can be generated for each --    country by  which shows: --       --       XXX --    Directly using template  can bypass --    other country templates, and avoid hundreds in total, --    but XXX must be repeated in name, alias & flag alias. -- -- F3: The flag+wikilink combinations were originally --    generated by the 3-letter templates, such as 🇩🇪 --    for the Germany flag+Germany. However, in most --    cases, using template  undefined will generate the same --    data and match as identical: 🇩🇪=🇩🇪 Germany --    Unfortunately,  undefined uses --    so for all flags, hundreds of "Country data XXX" --    templates were also being transcluded. Eventually, --    to use the fewest templates, use : --      --     Although country name is repeated 3 times, it avoids --    🇩🇪, 🇩🇪 Germany & --    avoiding 3 templates for each nation. -- -- Q4: Among the many quirks of images, an image name --    using blanks will not match a name with underscores --    or underbars ("_"), although they display the same. -- -- S4: The top 40 most-referenced nations have been --    sorted into order, to match as quickly as possible --    in the #switch logic. -- -- W5: The following are unusual items: --    Switzerland=CH but set "Schwyz" as CH-SZ. --    Flags of groups add "the" but not in Fed...Micronesia. --    Flag of Wales has "2" suffix:  Flag of Wales 2.svg --    Flag of Belgium:  Flag of Belgium (civil).svg --    Flag of Switzerland uses 🇨🇭 not {Country flag2}. --    BEWARE: Flag name underbars won't match spaced names. -- --    For simplicity, not all flags have been added into --    the template, and some nation flags will not match. -- -- --HISTORY: --08Mar09 Created to get 2-letter codes by flag-code templates. --24Mar10 Added HISTORY comments to log major changes. --25Mar10 Redone to omit most 3-letter templates {DEU},{VAT}... --25Mar10 Redone to omit 562 subtemplates of nation data/flags. --25Mar10 Re-added Europe/Africa/Asia flags as {Country flag2}. --25Mar10 Added internal NOTES comments to explain template coding. --25Mar10 Fixed Switzerland=CH (not SZ), canton Schwyz as CH-SZ. --27Mar10 Sorted 40 most-referenced nations to match quickly. -- -->