Difference between revisions of "Module:City/doc"
Jump to navigation
Jump to search
en>Jarekt |
m (1 revision imported) |
(No difference)
|
Latest revision as of 22:22, 9 February 2019
40x40px |
40x40px |
Summary
This module is intended for showing names of places, like cities or countries, in the language of the user and with a link to wikipedia article in that language if
Using this module from templates
city
This module should only be called from {{City}} template. Please call that template to access this module. Also see {{City}} template for full documentation
Usage:
{{#invoke:City|city|place=...|lang=...|link=...}}
Parameters:
- 1
- place name
- lang
- language to show it in. Users language by default.
- link
- site to which the link should link to. Wikipedia by default. Other possible values:
commons
,wikidata
-
deactivate all links
Example:
{{#invoke:City|city|place=Paris|lang=en}}
produces Lua error in Module:Wikidata_label at line 69: attempt to index field 'wikibase' (a nil value).
Using this module from Lua code
In order to use the functions in this module from another Lua module you first have to import this module.
Example:
local City = require('Module:City')._city
_city
Usage:
city_str = City(place,lang)
See Also
- {{City}}
- Module:City/data - data structure cataloging all known city names