Actions

Template

Difference between revisions of "CountryCheck"

From Sega Retro

(Created page with "<includeonly>{{ #if:{{#pos:{{{1|}}}|Japan}}|Japan|{{ #if:{{#pos:{{{1|}}}|United States}}|the United States|{{ #if:{{#pos:{{{1|}}}|United Kingdom}}|the United Kingdom|{{ #if:{{...")
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{
+
<includeonly>{{#vardefine:country|}}{{#if:
#if:{{#pos:{{{1|}}}|Japan}}|Japan|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Japan}}|{{#vardefine:country|Japan}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|United States}}|the United States|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|United States}}|{{#vardefine:country|the United States}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|United Kingdom}}|the United Kingdom|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|United Kingdom}}|{{#vardefine:country|the United Kingdom}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Argentina}}|Argentina|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Argentina}}|{{#vardefine:country|Argentina}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Austria}}|Austria|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Austria}}|{{#vardefine:country|Austria}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Australia}}|Australia|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Australia}}|{{#vardefine:country|Australia}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Brazil}}|Brazil|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Brazil}}|{{#vardefine:country|Brazil}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Canada}}|Canada|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Bulgaria}}|{{#vardefine:country|Bulgaria}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|China}}|China|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Canada}}|{{#vardefine:country|Canada}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Denmark}}|Denmark|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|China}}|{{#vardefine:country|China}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|France}}|France|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Denmark}}|{{#vardefine:country|Denmark}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Germany}}|Germany|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|France}}|{{#vardefine:country|France}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Greece}}|Greece|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Finland}}|{{#vardefine:country|Finland}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|India}}|India|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Germany}}|{{#vardefine:country|Germany}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Israel}}|Israel|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Greece}}|{{#vardefine:country|Greece}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Italy}}|Italy|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Hong Kong}}|{{#vardefine:country|Hong Kong}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Mexico}}|Mexico|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Hungary}}|{{#vardefine:country|Hungary}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Netherlands}}|the Netherlands|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|India}}|{{#vardefine:country|India}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|New Zealand}}|New Zealand|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Israel}}|{{#vardefine:country|Israel}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Norway}}|Norway|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Italy}}|{{#vardefine:country|Italy}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Poland}}|Poland|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Mexico}}|{{#vardefine:country|Mexico}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Portugal}}|Portugal|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Netherlands}}|{{#vardefine:country|the Netherlands}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Russia}}|Russia|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|New Zealand}}|{{#vardefine:country|New Zealand}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Spain}}|Spain|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Norway}}|{{#vardefine:country|Norway}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|South Korea}}|South Korea|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Philippines}}|{{#vardefine:country|the Philippines}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Sweden}}|Italy|{{
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Poland}}|{{#vardefine:country|Poland}}}}}}{{#if:
#if:{{#pos:{{{1|}}}|Taiwan}}|Taiwan|
+
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Portugal}}|{{#vardefine:country|Portugal}}}}}}{{#if:
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}</includeonly><noinclude>
+
{{#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|}}}|Slovenia}}|{{#vardefine:country|Slovenia}}}}}}{{#if:
 +
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Spain}}|{{#vardefine:country|Spain}}}}}}{{#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|}}}|Taiwan}}|{{#vardefine:country|Taiwan}}}}}}{{#if:
 +
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Thailand}}|{{#vardefine:country|Thailand}}}}}}{{#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.

Revision as of 10:34, 26 March 2020


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

{{CountryCheck|ldifrtjsua pofjkadsfA, United Kingdom}}

becomes

the United Kingdom