Template:LangToWiki: Difference between revisions
Content deleted Content added
Let’s use a pretty-complete module |
+→See also: {{LangToIw}} |
||
Line 28: | Line 28: | ||
* <code><nowiki>{{langToWiki|wikidata}}</nowiki></code> gives <code>{{langToWiki|wikidata}}</code> (not a language) |
* <code><nowiki>{{langToWiki|wikidata}}</nowiki></code> gives <code>{{langToWiki|wikidata}}</code> (not a language) |
||
* <code><nowiki>{{langToWiki|abcdef}}</nowiki></code> gives <code>{{langToWiki|abcdef}}</code> (not a language) |
* <code><nowiki>{{langToWiki|abcdef}}</nowiki></code> gives <code>{{langToWiki|abcdef}}</code> (not a language) |
||
== See also == |
|||
* {{tl|LangToIw}} which gives interwiki prefix (instead of Wikidata site identifier) and uses page language as default (instead of interface language). |
|||
}} |
}} |
Revision as of 20:53, 16 October 2022
en
Template documentation
This template returns the Wikidata interwiki identifier which matches with interface language or the given language code.
Returns the Wikidata interwiki identifier string, from interface language or given language code.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Language code | 1 | no description
| String | suggested |
Examples
{{langToWiki}}
givesen
{{langToWiki|pt}}
givespt
{{langToWiki|pt-br}}
givespt
{{langToWiki|zh-hans}}
giveszh
{{langToWiki|nan}}
giveszh_min_nan
{{langToWiki|wikidata}}
giveswikidata
(not a language){{langToWiki|abcdef}}
givesabcdef
(not a language)
See also
- {{LangToIw}} which gives interwiki prefix (instead of Wikidata site identifier) and uses page language as default (instead of interface language).