Module:Language
| This module is rated as beta. It is considered ready for widespread use, but as it is still relatively new, it should be applied with some caution to ensure results are as expected. |
| This module is currently under extended confirmed protection. Extended confirmed protection prevents edits from all unregistered editors and registered users with fewer than 30 days tenure and 500 edits. The policy on community use specifies that extended confirmed protection can be applied to combat disruption, if semi-protection has proven to be ineffective. Extended confirmed protection may also be applied to enforce arbitration sanctions. Please discuss any changes on the talk page; you may submit an edit request to ask for uncontroversial changes supported by consensus. |
| This module depends on the following other modules: |
This module is used by {{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 the correct section of the Wiktionary 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 Wiktionary'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|wiktlang|en|language}}-> language{{#invoke:Wikt-lang|wiktlang|en|language|languages}}-> languages{{#invoke:Wikt-lang|wiktlang|fr|bourguignon}}-> bourguignon{{#invoke:Wikt-lang|wiktlang|la|homō}}-> homō{{#invoke:Wikt-lang|wiktlang|grc|δημοκρατίᾱ}}-> δημοκρατίᾱ{{#invoke:Wikt-lang|wiktlang|ru|язы́к}}-> язы́к{{#invoke:Wikt-lang|wiktlang|ar|العَرَبِيَّة}}-> العَرَبِيَّة{{#invoke:Wikt-lang|wiktlang|fa|فارسی}}-> فارسی{{#invoke:Wikt-lang|wiktlang|ine-x-proto|*h₂enǵʰ-}}-> *h₂enǵʰ-
Invalid codes
{{#invoke:Wikt-lang|wiktlang|EN|language}}-> language{{#invoke:Wikt-lang|wiktlang|En|language|languages}}-> languages{{#invoke:Wikt-lang|wiktlang|La|homō}}-> homō{{#invoke:Wikt-lang|wiktlang|Grc|δημοκρατίᾱ}}-> δημοκρατίᾱ{{#invoke:Wikt-lang|wiktlang|Ru|язы́к}}-> язы́к{{#invoke:Wikt-lang|wiktlang|Ar|العَرَبِيَّة}}-> العَرَبِيَّة{{#invoke:Wikt-lang|wiktlang|Fa|فارسی}}-> فارسی
Errors
{{#invoke:Wikt-lang|wiktlang|en-Latin|language}}-> language [Latinis not a valid script code.]
Comparison of codes
| Language code | Wiktionary name | English Wikipedia name |
|---|---|---|
| aaq | Penobscot | Eastern Abnaki |
| abe | Abenaki | Western Abnaki |
| ajp | South Levantine Arabic | South Levantine Arabic |
| alg-pro | Proto-Algonquian | Error: unrecognized language tag: alg-pro |
| apc | North Levantine Arabic | Levantine Arabic |
| arb | Modern Standard Arabic | Standard Arabic |
| cel-x-bryproto | Proto-Brythonic | Error: unrecognized private tag: bryproto |
| cu | Old Church Slavonic | Church Slavonic |
| egy | Egyptian | Ancient Egyptian |
| frp | Franco-Provençal | Arpitan |
| gmw-x-proto | Proto-West Germanic | Proto-West Germanic |
| grk-x-proto | Proto-Hellenic | Proto-Greek |
| ine-x-bsproto | Proto-Balto-Slavic | Error: unrecognized private tag: bsproto |
| moe | Cree | Innu |
| mul | Translingual | multiple |
| nds-de | German Low German | Low German |
| non-x-proto | Proto-Norse | Error: unrecognized private tag: proto |
| poz-x-polproto | Proto-Nuclear Polynesian | Error: unrecognized private tag: polproto |
| rw | Rwanda-Rundi | Kinyarwanda |
| tts | Isan | Northeastern Thai |
| xlu | Luwian | Cuneiform Luwian |
| zle-x-ort | Old Ruthenian | Error: unrecognized private tag: ort |
Tracking categories
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.