Module:City/doc

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules

This is the documentation page for Module:City


Summary

[edit]

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

[edit]

city

[edit]

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 Paris

Using this module from Lua code

[edit]

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

[edit]

Usage:

city_str = City(place,lang)

See Also

[edit]