-- Localization for Module:Navseasoncats.
local translations2local = {
-- Must check decade before year.
{ 'Category', 'বিষয়শ্রেণী' },
{ 's ◆DECADE◆', '-এর দশ' },
{ ' ◆YEAR◆', '-এ' },
{ 'century', 'শতাব্দী' },
{ 'season', 'মৌসুম' },
{ 'series', 'ধারাবাহিক' },
}
local function text2local(text)
for _, v in ipairs(translations2local) do
local a, b = unpack(v)
text = text:gsub(a, b)
end
return text
end
local function text2en(text)
for _, v in ipairs(translations2local) do
local a, b = unpack(v)
text = text:gsub(b, a)
end
return text
end
local year2decade = {
-- Used when trying decades after making a years navbox.
{
find = 's ◆YEAR◆',
-- Pairs are { 'replace', 'extraLast' } where extraLast
-- is what follows ◆DECADE◆ at translations2local.
{ '-এর দশক', 'ক' },
{ '-এর দশকে', 'কে' },
{ '-এর দশকের', 'কের' },
},
{
find = '(%d)s$',
replace = true,
{ '%1-এর দশক', '◆DECADE◆ক' },
{ '%1-এর দশকে', '◆DECADE◆কে' },
{ '%1-এর দশকের', '◆DECADE◆কের' },
},
}
return {
text2local = text2local,
text2en = text2en,
year2decade = year2decade,
}