Module:City/doc

From Dharmawiki
< Module:City
Revision as of 18:58, 7 June 2018 by en>Jarekt
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the documentation page for Module:City


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