Ubuntu – the two-character language code for the Latin American keyboard layout

indicatorinput-languagekeyboard-layout

I've created some packs of svg flag icons for the language indicator menu. I'm expanding it now, and have had a request for a flag for the "Latin American" layout of Spanish. But I can't figure out what two-character filename is linked to that layout. It's not ES (for spanish) and this list of language codes doesn't seem to include anything that fits. Does anyone know what the two-character code is for the Latin American layout?

(If you're interested, the flag packs are posted on Gnome Look: seperately for dark panels and for light panels).

Best Answer

ES

There is not one-to-one correlation between languages, countries, and keyboard layouts.

Some languages are associated with multiple keyboard layouts, e.g. English: USA and United Kingdom. Some keyboard layouts are associated with multiple languages, e.g. Kazakhstan: Kazakh and Russian. Many keyboard layouts are associated with multiple countries, e.g. Latin American…

The Latin American (latam) keyboard layout is associated with all of the following countries:

  • AR, BO, CL, CO, CR, CU, DO, EC, GT, HN, HT, MX, NI, PA, PE, PR, PY, SV, US, UY, VE

and the following languages:

  • spa

So in this case, you are lucky. Latin American is only associated with one language. "es" is your two-letter language code.

That aside, I would recommend against using language codes to indicate keyboard layouts. There is a separate system already in place for abbreviating the names of the layouts themselves. See shortDescription in xkb-data's base.xml.