Module:Wikt-lang/doc: Difference between revisions

From Bharatpedia, an open encyclopedia
(Created page with "{{Module rating|beta}} {{Language templates}} {{Lua|Module:Wikt-lang/data|Module:Unicode data}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Bharatdata (see Bharatpedia:Bharatdata) --> This module is used by {{tlx|Wikt-lang}}. It is inspired by the templates {{((}}m{{))}} and {{((}}l{{))}} and their associated modules on Wiktionary. It has a Wiktionary link function that links to th...")
 
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
Line 4: Line 4:
<!-- Please place categories where indicated at the bottom of this page and interwikis at Bharatdata (see [[Bharatpedia:Bharatdata]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Bharatdata (see [[Bharatpedia:Bharatdata]]) -->


This module is used by {{tlx|Wikt-lang}}. 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.
This module is used by {{tlx|Wikt-lang}}. It is inspired by the templates [[wikt:Template:m|{{((}}m{{))}}]] and [[wikt:Template:l|{{((}}l{{))}}]] and their associated modules on Bharationary. It has a Bharationary link function that links to the correct section of the Bharationary 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:Wikt-lang/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|Wikt-lang 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:Wikt-lang/data]], and similarly when the correct entry name is not generated, please add the entry name replacements to the module.
The module uses [[Module:Wikt-lang/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 Bharationary's [[wikt:Category:Language data modules|Wikt-lang 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:Wikt-lang/data]], and similarly when the correct entry name is not generated, please add the entry name replacements to the module.


===Examples===
===Examples===

Latest revision as of 22:43, 3 November 2024

This module is used by {{Wikt-lang}}. It is inspired by the templates {{m}} and {{l}} and their associated modules on Bharationary. It has a Bharationary link function that links to the correct section of the Bharationary entry, and applies correct language formatting and italics. The language-tagging function does most of what {{Lang}} does, except that italics can't be customized and categories aren't added.

The module uses Module:Wikt-lang/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 Bharationary's Wikt-lang data modules. For language codes that do not have a name value in this module, the language name is fetched with mw.language.fetchLanguage. When mw.language.fetchLanguage does not fetch the correct language name (or any language name at all), please add it to Module:Wikt-lang/data, and similarly when the correct entry name is not generated, please add the entry name replacements to the module.

Examples

  • {{#invoke:Wikt-lang|wikt|en|language}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|en|language|languages}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|fr|bourguignon}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|la|homō}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|grc|δημοκρατίᾱ}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|ru|язы́к}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|ar|العَرَبِيَّة}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|fa|فارسی}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|ine-x-proto|*h₂enǵʰ-}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.

Invalid codes

  • {{#invoke:Wikt-lang|wikt|EN|language}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|En|language|languages}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|La|homō}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|Grc|δημοκρατίᾱ}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|Ru|язы́к}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|Ar|العَرَبِيَّة}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.
  • {{#invoke:Wikt-lang|wikt|Fa|فارسی}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.

Errors

  • {{#invoke:Wikt-lang|wikt|en-Latin|language}} -> Lua error in Module:Wikt-lang at line 306: variable 'linkToBharationary' is not declared.

Tracking categories