Difference between revisions of "Template:Country2iso3"

From blackwiki
Jump to navigation Jump to search
imported>Guarapiranga
(Correction)
imported>Guarapiranga
m (error)
Line 6: Line 6:
 
<code><nowiki>{{Country2iso3 | country name}}</nowiki></code>
 
<code><nowiki>{{Country2iso3 | country name}}</nowiki></code>
  
=== Usage ===
+
=== Example ===
 
<code><nowiki>{{Country2iso3 | China}}</nowiki></code> yields <code>{{Country2iso3 | China}}</code>}}</noinclude>
 
<code><nowiki>{{Country2iso3 | China}}</nowiki></code> yields <code>{{Country2iso3 | China}}</code>}}</noinclude>

Revision as of 02:56, 31 October 2019

Template documentation

This template does the same as {{ISO 3166 code-3}}, however, rather than being Lua-based like {{ISO 3166 code-3}}, it transcludes the ISO codes ISO 3166-1 alpha-3 based on the provided country name. This is particularly useful when subst'ing ISO codes, as Lua modules need to be subst'd twice, and {{ISO 3166 code-3}} often times out on long lists of countries.

Usage

{{Country2iso3 | country name}}

Example

{{Country2iso3 | China}} yields {{#lst:ISO 3166-1 alpha-3| China}}