Changes

Jump to navigation Jump to search
1,326 bytes added ,  18:58, 7 June 2018
no edit summary
{{Module rating|release}}{{Module rating|protected}}
__NOTOC__

== 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 {{tl|City}} template. Please call that template to access this module. Also see {{tl|City}} template for full documentation

Usage:
: <code><nowiki>{{#invoke:</nowiki>City|city|place=...|lang=...|link=...}}</code>

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:
:* <code>commons</code>,
:* <code>wikidata</code>
:*<code>-</code> deactivate all links
Example:
: <code><nowiki>{{#invoke:City|city|place=Paris|lang=en}}</nowiki></code> produces {{#invoke:City|city|place=Paris|lang=en}}

== 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:
: <code>local City = require('Module:City')._city</code>

=== _city ===

Usage:
: <code>city_str = City(place,lang)</code>

==See Also==
*{{tl|City}}
*[[Module:City/data]] - data structure cataloging all known city names
Anonymous user

Navigation menu