Jump to content

ഫലകം:Mw lang/doc

വിക്കിപീഡിയ, ഒരു സ്വതന്ത്ര വിജ്ഞാനകോശം.

A template similar to {{ISO 639 name}} that uses MediaWiki's language set.


This template accepts two positional parameters and has one named parameter.

{{mw lang|<language code or name>|<target language code>|fn=<function name>}}

  • |fn= – names the function to be called in Module:mw lang. Valid values are:
    • name_from_code – (default) essentially the same as the {{#language:}} magic word
    • is_code – returns true when <language code> is a valid MediaWiki language code
    • code_from_name – inverse of name_from_code; attempts to return a language code for <language name>
    • is_name – returns true when <language name> is a valid MediaWiki language name
  • <language code> required for name_from_code and is_code
  • <language name> required for code_from_name – case agnostic, must otherwise match MediaWiki language name exactly
  • <target language code> (optional) specifies MediaWiki language set to evaluate; defaults to local wiki language


{{mw lang|nv|en}} → Navajo

{{mw lang| nv | sq }} → navahoisht

{{mw lang|fn=is_code|nv|en}} → true

{{mw lang|fn=is_code|xx}} →← (not valid, returns nil)

{{mw lang|fn=code_from_name|navajo|en}} → nv

{{mw lang|fn=code_from_name| navahoisht | sq }} → nv

"https://ml.wikipedia.org/w/index.php?title=ഫലകം:Mw_lang/doc&oldid=3447465" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്