User:Erutuon/scripts/searchLang.js/documentation

Documentation for User:Erutuon/scripts/searchLang.js. [edit]
This page contains usage information, categories, interwiki links and other content describing the template.

This script adds a box to search for languages in the sidebar. It gets language names and codes via Module:languages/javascript-interface and saves them in localStorage. It requires a modern browser with ECMAScript 2016 (ES7).

To do:

  • Make sure data is up-to-date. Set expiration date or check for edit to module?

Ideas:

  • Diacritic stripping.
  • Allow customization through a global object.
  • Search non-canonical names; but how to display them?