Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Language/doc
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Module rating|beta}} {{Language templates}} {{Lua|Module:Language/data|Module:Unicode data}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> This module is used by {{tlx|wikt-lang}} and {{tlx|wt}}. It is inspired by the templates [[wikt:Template:m|{{((}}m{{))}}]] and [[wikt:Template:l|{{((}}l{{))}}]] and their associated modules on Wiktionary. It has a Wiktionary link function that links to the correct section of the Wiktionary entry, and applies correct language formatting and italics. The language-tagging function does most of what {{t|lang}} does, except that italics can't be customized and categories aren't added. The module uses [[Module:Language/data]] to retrieve the language name for a language code, and to perform the necessary entry-name replacements (for instance, removing macrons from Latin entry names). These are unfortunately not automatically retrieved from Wiktionary's [[wikt:Category:Language data modules|language data modules]]. For language codes that do not have a <code>name</code> value in this module, the language name is fetched with <code>mw.language.fetchLanguage</code>. When <code>mw.language.fetchLanguage</code> does not fetch the correct language name (or any language name at all), please add it to [[Module:language/data]], and similarly when the correct entry name is not generated, please add the entry name replacements to the module. ===Examples=== <pre style="max-width: 30em;"> * {{#invoke:Language|wikt|en|language}} * {{#invoke:Language|wikt|en|language|languages}} * {{#invoke:Language|wikt|fr|bourguignon}} * {{#invoke:Language|wikt|la|homō}} * {{#invoke:Language|wikt|grc|δημοκρατίᾱ}} * {{#invoke:Language|wikt|ru|язы́к}} * {{#invoke:Language|wikt|ar|العَرَبِيَّة}} * {{#invoke:Language|wikt|fa|فارسی}} * {{#invoke:Language|wikt|ine-x-proto|*h₂enǵʰ-}}</pre> * {{#invoke:Language|wikt|en|language}} * {{#invoke:Language|wikt|en|language|languages}} * {{#invoke:Language|wikt|fr|bourguignon}} * {{#invoke:Language|wikt|la|homō}} * {{#invoke:Language|wikt|grc|δημοκρατίᾱ}} * {{#invoke:Language|wikt|ru|язы́к}} * {{#invoke:Language|wikt|ar|العَرَبِيَّة}} * {{#invoke:Language|wikt|fa|فارسی}} * {{#invoke:Language|wikt|ine-x-proto|*h₂enǵʰ-}} ====Invalid codes==== <pre style="max-width: 30em;"> * {{#invoke:Language|wikt|EN|language}} * {{#invoke:Language|wikt|En|language|languages}} * {{#invoke:Language|wikt|La|homō}} * {{#invoke:Language|wikt|Grc|δημοκρατίᾱ}} * {{#invoke:Language|wikt|Ru|язы́к}} * {{#invoke:Language|wikt|Ar|العَرَبِيَّة}} * {{#invoke:Language|wikt|Fa|فارسی}}</pre> * {{#invoke:Language|wikt|EN|language}} * {{#invoke:Language|wikt|En|language|languages}} * {{#invoke:Language|wikt|La|homō}} * {{#invoke:Language|wikt|Grc|δημοκρατίᾱ}} * {{#invoke:Language|wikt|Ru|язы́к}} * {{#invoke:Language|wikt|Ar|العَرَبِيَّة}} * {{#invoke:Language|wikt|Fa|فارسی}} ====Errors==== <pre>* {{#invoke:Language|wikt|en-Latin|language}}</pre> * {{#invoke:Language|wikt|en-Latin|language}} == Tracking categories == * {{Category link with count|Language module errors}} * {{Category link with count|Language module reconstructed with no asterisk}} * {{Category link with count|Language module using redirect code}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Language-related modules]] }}</includeonly>
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:((
(
edit
)
Template:))
(
edit
)
Template:Category link with count
(
edit
)
Template:Language templates
(
edit
)
Template:Lua
(
edit
)
Template:Module rating
(
edit
)
Template:T
(
edit
)
Template:Tlx
(
edit
)
Module:Arguments
(
edit
)
Module:Exponential search
(
edit
)
Module:Lang/data
(
edit
)
Module:Language
(
edit
)
Module:Language/data
(
edit
)
Module:Language/data/iana languages
(
edit
)
Module:Language/data/iana regions
(
edit
)
Module:Language/data/iana scripts
(
edit
)
Module:Language/data/iana suppressed scripts
(
edit
)
Module:Language/data/iana variants
(
edit
)
Module:TableTools
(
edit
)
Module:Template link general
(
edit
)
Module:Unicode data
(
edit
)
Module:Unicode data/scripts
(
edit
)