Skip to content
  • Peter Serwylo's avatar
    Add language chooser to sidebar. · b2944792
    Peter Serwylo authored
    Use a dropdown instead of rendering each flag. Although it doesn't look
    as nice when there are only two or three options to choose from, it:
     * Works well with lots of translations.
     * Falls back gracefully when the relevant icon is not found.
    
    It redirects the browser via JS as soon as a new language is chosen.
    
    When JS is disabled, it falls back to showing a "Change" button, which
    in concert with a `.htaccess` `mod_rewrite` rule, takes incoming
    `lang=fr` query parameters and rewrites them to `/fr/...`
    
    Icons are from the
    https://github.com/googlei18n/region-flags/blob/gh-pages/COPYING
    project, which subsequently took them from Wikipedia and confirmed they
    are in the public domain.
    b2944792