Difference between revisions of "Module:Template translation"

Jump to navigation Jump to search
isValidCode --> isKnownLanguageTag
>Guillom
m (testing: subpage is valid lang code?)
>Guillom
(isValidCode --> isKnownLanguageTag)
Line 19: Line 19:
         template exists in that language; if so, put it in langcode ]]
         template exists in that language; if so, put it in langcode ]]
      
      
     if ( mw.language.isValidCode( subpage ) )
     if ( mw.language.isKnownLanguageTag( subpage ) )
     then
     then
         local translation = mw.title.new( frame[template]..'/'..subpage, 'Template' )
         local translation = mw.title.new( frame[template]..'/'..subpage, 'Template' )
Anonymous user

Navigation menu