require('strict');localdefault_caption='যোগকৃত শব্দ';localwords_header='ভুক্তির শিরোনাম';localcounts_header='শব্দসংখ্যা';localtotal_header='মোট শব্দসংখ্যা';locallang_obj=mw.language.getContentLanguage();--[[--------------------------< M A I N >----------------------------------------------------------------------created per User_talk:Trappist_the_monk#Module_help]]localfunctionmain(frame)localargs_t=require('Module:Arguments').getArgs(frame);localword_table=mw.html.create("table")-- create a wikitable of competition words:addClass('wikitable sortable')word_table:node(mw.html.create('caption'):wikitext(args_t.captionordefault_caption));-- add a table caption for accessabilityword_table:node(mw.html.create("tr")-- create a header row:node(mw.html.create("th"):attr('style','width: 10em;'):wikitext(words_header)):node(mw.html.create("th"):attr('style','width: 10em;'):wikitext(counts_header)));localword=nil;localcount=nil;localtotal_count=0;fori,identifierinipairs(args_t)do-- spin through the template-supplied parameters in orderif0~=i%2thenword=args_t[i];-- odd numbered parameters are wordselsecount=lang_obj:parseFormattedNumber(args_t[i]);-- even numbered parameters are counts; unformat and convert to numberendifwordandcountthenword_table:node(mw.html.create("tr")-- create a new table row:node(mw.html.create("td"):wikitext('[['..word..']]'))-- add wikilinked 'word':node(mw.html.create("td"):wikitext(lang_obj:formatNum(count)))-- add fomatted 'count');total_count=total_count+count;word=nil;-- unset for the next word/count paircount=nil;endendword_table:node(mw.html.create("tr"):attr('class','sortbottom')-- create the bottom-sorted totals row:node(mw.html.create("th"):attr('scope','row'):wikitext(total_header)):node(mw.html.create("td"):wikitext(lang_obj:formatNum(tonumber(total_count)))));returnword_table:allDone();-- and doneend--[[--------------------------< E X P O R T S >----------------------------------------------------------------]]return{main=main}