Actions

Template

Difference between revisions of "CountryCheck"

From Sega Retro

Line 7: Line 7:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Australia}}|{{#vardefine:country|Australia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Australia}}|{{#vardefine:country|Australia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Brazil}}|{{#vardefine:country|Brazil}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Brazil}}|{{#vardefine:country|Brazil}}}}}}{{#if:
 +
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Bulgaria}}|{{#vardefine:country|Bulgaria}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Canada}}|{{#vardefine:country|Canada}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Canada}}|{{#vardefine:country|Canada}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|China}}|{{#vardefine:country|China}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|China}}|{{#vardefine:country|China}}}}}}{{#if:
Line 23: Line 24:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|New Zealand}}|{{#vardefine:country|New Zealand}}}}}}{{#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|}}}|Norway}}|{{#vardefine:country|Norway}}}}}}{{#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|}}}|Poland}}|{{#vardefine:country|Poland}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Portugal}}|{{#vardefine:country|Portugal}}}}}}{{#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|}}}|Russia}}|{{#vardefine:country|Russia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Slovenia}}|{{#vardefine:country|Slovenia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Slovenia}}|{{#vardefine:country|Slovenia}}}}}}{{#if:
Line 31: Line 34:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Sweden}}|{{#vardefine:country|Sweden}}}}}}{{#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|}}}|Taiwan}}|{{#vardefine:country|Taiwan}}}}}}{{#if:
 +
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Thailand}}|{{#vardefine:country|Thailand}}}}}}{{#if:
 
{{#var:country}}|{{#var:country}}|unknown}}
 
{{#var:country}}|{{#var:country}}|unknown}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>

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