• Philip Müller's avatar
    Keyboard: guess at layout based on locale · c103f80d
    Philip Müller authored
    Split locale into <language>_<country> and go looking for keyboard
    layouts that match. Do that in reverse, so look for country first.
    
    - known weakness is el_CY [should get layout gr] because CY and el
      don't name any keyboard layout.
    - known weakness are Hausa, Igbo .. which are ha_NG and ig_NG. They select
      keyboard layout ng, which is labeled 'English [Nigeria]'; they ought
      to select ng[hausa] and ng[igbo], which are the right variant keyboard
      layouts to use.
    - similar selecting a locale in Canada [en_CA, fr_CA, iu_CA ...] will
      select keyboard layout ca, which is for French-speaking Canada.
      Locale en_CA should select keyboard en -- e.g. en[us]. But iu_CA
      [Inuktituk] needs layout ca[ike].
    c103f80d