Definition from Wiktionary, the free dictionary
Jump to: navigation, search

This is meant to be called from within Japanese headword templates like {{ja-noun}}. It requires PAGENAME as the single unnamed parameter, and using that it returns the appropriate script category. At the moment there are three:

  1. Category:Japanese hiragana for terms that are entirely hiragana, sorted with the Module:ja|jsort key
  2. Category:Japanese katakana for terms that are entirely katakana, sorted with the Module:ja|jsort key converted back to katakana (note that previously this category was not given a sort key)
  3. Category:Japanese terms written in multiple scripts, where "multiple scripts" is taken to mean Roman letters or numbers in combination with a kana or Han characters.

The code (hopefully) always does the right thing, so it cannot be overridden, and templates that use this can ignore the values ka, h, k, and kk which previously served to do the same thing manually.