模組:Th-translit

維基詞典,自由的多語言詞典

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

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

關於測試用例,請參閱Module:Th-translit/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.

-- Transliteration for Thai 泰語轉譯

local export = {}

local m_pron = require("Module:th-pron")

function export.tr(text, lang, sc)
	return m_pron.translit(text, lang, sc, "paiboon", "translit-module")
end

function export.tr1(text)
	return table.concat(m_pron.getCharSeqTbl(text))
end

return export