Difference between revisions of "CountryCheck"
From Sega Retro
Ccawley2011 (talk | contribs) |
|||
(15 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{ | + | <includeonly>{{#vardefine:country|}}{{#if: |
− | # | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Japan}}|{{#vardefine:country|Japan}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|United States}}|{{#vardefine:country|the United States}}}}}}{{#if: |
− | # | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|United Kingdom}}|{{#vardefine:country|the United Kingdom}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Argentina}}|{{#vardefine:country|Argentina}}}}}}{{#if: |
− | # | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Austria}}|{{#vardefine:country|Austria}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Australia}}|{{#vardefine:country|Australia}}}}}}{{#if: |
− | #if:{{# | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Belgium}}|{{#vardefine:country|Belgium}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Brazil}}|{{#vardefine:country|Brazil}}}}}}{{#if: |
− | #if:{{# | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Bulgaria}}|{{#vardefine:country|Bulgaria}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Canada}}|{{#vardefine:country|Canada}}}}}}{{#if: |
− | #if:{{# | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Chile}}|{{#vardefine:country|Chile}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|China}}|{{#vardefine:country|China}}}}}}{{#if: |
− | #if:{{# | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Croatia}}|{{#vardefine:country|Croatia}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Czech}}|{{#vardefine:country|Czechia}}}}}}{{#if: |
− | # | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Denmark}}|{{#vardefine:country|Denmark}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Egypt}}|{{#vardefine:country|Egypt}}}}}}{{#if: |
− | # | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Estonia}}|{{#vardefine:country|Estonia}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|France}}|{{#vardefine:country|France}}}}}}{{#if: |
− | # | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Finland}}|{{#vardefine:country|Finland}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Germany}}|{{#vardefine:country|Germany}}}}}}{{#if: |
− | # | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Greece}}|{{#vardefine:country|Greece}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Guatemala}}|{{#vardefine:country|Guatemala}}}}}}{{#if: |
− | # | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Hong Kong}}|{{#vardefine:country|Hong Kong}}}}}}{{#if: |
− | #if:{{# | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Hungary}}|{{#vardefine:country|Hungary}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Iceland}}|{{#vardefine:country|Iceland}}}}}}{{#if: |
− | #if:{{# | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|India}}|{{#vardefine:country|India}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Indonesia}}|{{#vardefine:country|Indonesia}}}}}}{{#if: |
− | #if:{{# | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Israel}}|{{#vardefine:country|Israel}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Italy}}|{{#vardefine:country|Italy}}}}}}{{#if: |
− | #if:{{# | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Latvia}}|{{#vardefine:country|Latvia}}}}}}{{#if: |
− | #if:{{#pos:{{{1|}}}| | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Lithuania}}|{{#vardefine:country|Lithuania}}}}}}{{#if: |
− | + | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Malaysia}}|{{#vardefine:country|Malaysia}}}}}}{{#if: | |
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Mexico}}|{{#vardefine:country|Mexico}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Monaco}}|{{#vardefine:country|Monaco}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Morocco}}|{{#vardefine:country|Morocco}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Netherlands}}|{{#vardefine:country|the Netherlands}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|New Zealand}}|{{#vardefine:country|New Zealand}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Norway}}|{{#vardefine:country|Norway}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Panama}}|{{#vardefine:country|Panama}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Philippines}}|{{#vardefine:country|the Philippines}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Poland}}|{{#vardefine:country|Poland}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Portugal}}|{{#vardefine:country|Portugal}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Romania}}|{{#vardefine:country|Romania}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Russia}}|{{#vardefine:country|Russia}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Saudi Arabia}}|{{#vardefine:country|Saudi Arabia}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|San Marino}}|{{#vardefine:country|San Marino}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Serbia}}|{{#vardefine:country|Serbia}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Singapore}}|{{#vardefine:country|Singapore}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Slovakia}}|{{#vardefine:country|Slovakia}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Slovenia}}|{{#vardefine:country|Slovenia}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Spain}}|{{#vardefine:country|Spain}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|South Africa}}|{{#vardefine:country|South Africa}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|South Korea}}|{{#vardefine:country|South Korea}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Sweden}}|{{#vardefine:country|Sweden}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Switzerland}}|{{#vardefine:country|Switzerland}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Taiwan}}|{{#vardefine:country|Taiwan}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Thailand}}|{{#vardefine:country|Thailand}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Turkey}}|{{#vardefine:country|Turkey}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Ukraine}}|{{#vardefine:country|Ukraine}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|United Arab Emirates}}|{{#vardefine:country|the United Arab Emirates}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Uruguay}}|{{#vardefine:country|Uruguay}}}}}}{{#if: | ||
+ | {{#var:country}}||{{#if:{{#pos:{{{1|}}}|Yugoslavia}}|{{#vardefine:country|Yugoslavia}}}}}}{{#if: | ||
+ | {{#var:country}}|{{#var:country}}|unknown}} | ||
+ | </includeonly><noinclude> | ||
Quick and not-so-great template to extract country names from addresses. | Quick and not-so-great template to extract country names from addresses. | ||
Line 40: | Line 72: | ||
{{CountryCheck|ldifrtjsua pofjkadsfA, United Kingdom}} | {{CountryCheck|ldifrtjsua pofjkadsfA, United Kingdom}} | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 06:20, 17 May 2024
Quick and not-so-great template to extract country names from addresses.
{{CountryCheck|ldifrtjsua pofjkadsfA, United Kingdom}}
becomes
the United Kingdom