
در صورت تمایل یک صفحهٔ توضیحات برای این پودمان اسکریبونتو ایجاد کنید. ویرایشگران میتوانند در صفحات تمرین (ایجاد | آینه) و آزمایشی (ایجاد) این پودمان را آزمایش کنند. لطفاً ردهها را به زیرصفحهٔ /توضیحات بیافزایید. زیرصفحههای این پودمان. |
-- توابع مربوط به عنوانها را در اینجا local p = {} -- تابعی برای جداسازی نام شهرستان function p.district_name(frame) txt = frame.args[1] local xmatch = txt:match("شهرستان (.*)") if xmatch ~= nil then txt = xmatch end return txt end -- تابعی برای جداسازی نام ناحیهها function p.region_name(frame) txt = frame.args[1] local xmatch = txt:match("ناحیه (.*)") if xmatch ~= nil then txt = xmatch else local xmatch = txt:match("ناحیهٔ (.*)") if xmatch ~= nil then txt = xmatch end end return txt end -- تابعی برای جداسازی نام فرودگاه function p.airport_name(frame) txt = frame.args[1] local xmatch = txt:match("فرودگاه (.*)") if xmatch ~= nil then txt = xmatch end return txt end -- تبدیل زیر خط به فاصله در نشانیهای اینترنتی function p.urlencode(frame) txt = tostring(frame.args[1]) txt = mw.ustring.gsub(txt,'_','%%20') txt = mw.ustring.gsub(txt,' ','%%20') return txt end return p