模組:Inc-ash-translit
外观
這個模組會將阿輸迦普拉克里特語未確定的文字拉丁化。
最好不要直接從模板或其他模組調用此模組。要從模板中使用它,請以{{xlit}}做為替代;若要在模組中使用,則以Module:languages#Language:transliterate替代。
關於測試用例,請參閱Module:Inc-ash-translit/testcases。
函數
[编辑]tr(text, lang, sc)- Transliterates a given piece of
textwritten in the script specified by the codesc, and language specified by the codelang. When the transliteration fails, returnsnil.
local export = {}
function export.tr(text, lang, sc, debug_mode)
local out_text
if (sc == 'Brah') then
out_text = require('Module:Brah-translit').tr(text, lang, sc, debug_mode)
elseif (sc == 'Khar') then
out_text = require('Module:Khar-translit').tr(text, lang, sc, debug_mode)
else
local namespace = mw.title:getCurrentTitle().nsText
if namespace == "Category" then
out_text = nil
else
error('Invalid script for Ashokan Prakrit language.')
end
end
return out_text
end
return export