require('Module:No globals')localgetArgs=require('Module:Arguments').getArgslocalhatnote=require('Module:Hatnote')._hatnotelocalformatLink=require('Module:Format link')._formatLinklocalp={}localcatNS=mw.site.namespaces.Category.id-- category namespace number-- Lua implementation of [[Template:CategoryPair]]-- Arguments:-- prevTitle -- mw.title.Title object for preceding category-- nextTitle -- mw.title.Title object for succeeding category-- Returns:-- hatnote that says "see also" for one or both of prev/next (depending on whether they exist)functionp._pair(prevTitle,nextTitle)prevTitle=prevTitleandprevTitle.existsandformatLink{link=prevTitle.fullText}nextTitle=nextTitleandnextTitle.existsandformatLink{link=nextTitle.fullText}localnote=''ifprevTitleandnextTitlethen-- if bothnote=mw.ustring.format('पूर्ववर्ती %s र अपवर्ती %s पनि हेर्नुहोस्',prevTitle,nextTitle)elseifprevTitlethen-- if only prevTitlenote=mw.ustring.format('पूर्ववर्ती %s पनि हेर्नुहोस्',prevTitle)elseifnextTitlethen-- if only nextTitlenote=mw.ustring.format('अपवर्ती %s पनि हेर्नुहोस्',nextTitle)else-- otherwise neitherreturnmw.title.getCurrentTitle().namespace==catNSand''or''endreturnhatnote(note,{extraclasses='seealso'})endfunctionp.catPair(frame)localargs=getArgs(frame,{wrappers={'Template:Category pair'}})localprevTitle=args[1]andmw.title.new(args[1],catNS)localnextTitle=args[2]andmw.title.new(args[2],catNS)returnp._pair(prevTitle,nextTitle)endfunctionp.prevCat(frame)localargs=getArgs(frame,{wrappers={'Template:Preceding category'}})localprevTitle=args[1]andmw.title.new(args[1],catNS)returnp._pair(prevTitle,nil)endfunctionp.nextCat(frame)localargs=getArgs(frame,{wrappers={'Template:Succeeding category'}})localnextTitle=args[1]andmw.title.new(args[1],catNS)returnp._pair(nil,nextTitle)endreturnp