Template:Translit module documentation

這個模組會將待定語言未確定的文字拉丁化。

最好不要直接從模板或其他模組調用此模組。要從模板中使用它,請以{{xlit}}做為替代;若要在模組中使用,則以Module:languages#Language:transliterate替代。

關於測試用例,請參閱Module:Translit module documentation/testcases

函數

编辑
tr(text, lang, sc)
Transliterates a given piece of text written in the script specified by the code sc, and language specified by the code lang. When the transliteration fails, returns nil.

此模板為轉譯模組生成文檔頁面。模板生成需要一個語言或文字的代碼作為參數。第二個參數為可選,提供在「此模塊將音譯x語言文本」之後顯示其他文字。

If the second parameter is not provided, the languages that use the module will be listed, if they can be detected. In all cases, a category will be added for every language, and the category Transliteration modules will be added, with the canonical name corresponding to the code in the module name as sortkey (for example, Module:sa-translit[[Category:Transliteration modules|Sanskrit]]).

Module:languages/byTranslitModule finds the languages that use the module, and the translitModuleLangList function in Module:documentation lists them, and the categorize function in Module:module categorization adds categories for each one. This will only work if the transliteration module is listed in the language's data file or in the language's entry in Module:translit-redirect/data.