ข้ามไปเนื้อหา

มอดูล:su-translit

จาก วิกิพจนานุกรม พจนานุกรมเสรี

This module will transliterate ภาษาซุนดา text. The module should preferably not be called directly from templates or other modules. To use it from a template, use {{xlit}}. Within a module, use Module:languages#Language:transliterate.

For testcases, see Module:su-translit/testcases.

Functions

[แก้ไข]
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.

local export = {}

function export.tr(text, lang, sc, debug_mode)

	local out_text
	if (sc == 'Sund') then
		out_text = require('Module:Sund-translit').tr(text, lang, sc, debug_mode)
	elseif (sc == 'Latn') then
		out_text = nil
	else
		error('Invalid script for Sundanese language.')
	end

	return out_text

end

return export