Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 09:59, 22 November 2013 by commons>Zolo (ce)
Module documentation[ create · purge ]
This documentation is transcluded from Module:Linguistic/doc.
-- some simple internationalization that can be called by other modules
local p = {}
local vowels = 'aeiouyąăẵằẳặȃắâẫấầẩậãäǟāáàȁǎảẚåǻḁạǡæǣǽĕȇêễếềểệḙẽḛëēḕéḗèȅěẻẹęȩḝǝĭȋîĩḭïḯīíìȉǐỉịįıŏȏôỗốồổộõṏṍöōṑóṓòȍǒỏọǫǭơỡớờởợøǿŭȗûṷũṻṹṵüǖǘǜǚṳūúùȕǔủůụųưữứừửựŷỹÿȳýỳỷẙỵ'

function p.vowelfirst (str)
	if mw.ustring.find(vowels, str[1], 1, true ) then
		return true
	end
end

function p.wordsep(lang) -- default separator between words
	-- language with no separator
	if lang == 'zh' or lang == 'ja' or 'zh-hans' or lang == 'zh-hant'  or lang == 'zh-sg' or lang == 'zh-cn' or lang == 'zh-tw' then
		return ''
	end
	-- default: white space
	return ' ' 
end

function p.noungroup(noun, adj, lang)
	if not noun then 
		return nil end
	if not adj
		then return noun
	end
	-- adjective before the noun
	if lang == en or lang == de then
		return adj .. p.wordsep(lang) .. noun
	-- adjective after the noun
	elseif lang == 'fr' or lang == 'fr-ca' then
		return noun .. p.wordsep(lang) .. adj
	else
		return noun ' (' .. adj .. ')'
	end
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.