Difference between revisions of "CountryCheck"

From Sega Retro

Line 25: Line 25:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Iceland}}|{{#vardefine:country|Iceland}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Iceland}}|{{#vardefine:country|Iceland}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|India}}|{{#vardefine:country|India}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|India}}|{{#vardefine:country|India}}}}}}{{#if:
 +
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Indonesia}}|{{#vardefine:country|Indonesia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Israel}}|{{#vardefine:country|Israel}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Israel}}|{{#vardefine:country|Israel}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Italy}}|{{#vardefine:country|Italy}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Italy}}|{{#vardefine:country|Italy}}}}}}{{#if:
Line 41: Line 42:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Romania}}|{{#vardefine:country|Romania}}}}}}{{#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|}}}|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|}}}|San Marino}}|{{#vardefine:country|San Marino}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Serbia}}|{{#vardefine:country|Serbia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Serbia}}|{{#vardefine:country|Serbia}}}}}}{{#if:
Line 57: Line 59:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|United Arab Emirates}}|{{#vardefine:country|the United Arab Emirates}}}}}}{{#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|}}}|Uruguay}}|{{#vardefine:country|Uruguay}}}}}}{{#if:
 +
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Yugoslavia}}|{{#vardefine:country|Yugoslavia}}}}}}{{#if:
 
{{#var:country}}|{{#var:country}}|unknown}}
 
{{#var:country}}|{{#var:country}}|unknown}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>

Revision as of 17:32, 14 March 2024


Quick and not-so-great template to extract country names from addresses.

{{CountryCheck|ldifrtjsua pofjkadsfA, United Kingdom}}

becomes

the United Kingdom