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).

3 Answers 3



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.

  • Hmmmm. What I'm trying to do is figure out what filename to use for a flag image for the language indicator. In most cases the indicator looks for an image file with the name of the language's two-character code (not the country-code but the language code). Spanish, for example, is ES. Arabic is AR. US English is US. I expected the Latin American layout to use the spanish flag image (ES), but it doesn't. So it's really not a matter of what code I choose to use.
    – monotasker
    Oct 22, 2010 at 17:30
  • As mentioned in some other answers and comments, focusing on latam might be usefull. And apart from that, Spanish Flag image is not suitable for Latin American layout. I don't know what you will create for it but it shouldn't be a national flag, Spanish flag being the most irrelevant. At least, Spain is not even in Americas. Oct 22, 2010 at 18:41

From the base.xml "source" file:


I suspect that's what you need.

  • Thanks, yes! After your suggestion I also found it in the base.lst file. Thanks again.
    – monotasker
    Oct 22, 2010 at 17:46

There are two distinctive things here:

Languages (and codes for them).

Language codes have some international standards as monotasker referenced. There's no such thing in these standards as "Latin American" or something similar, because there is no such a language. Apart from Brazilian Portugese, Latin Americans speak some variation(s) of Spanish, and the code for Spanish as a language is clear.

Keyboard layouts (and codes for them).

On the other hand, when talking about keyboard layouts, I highly suspect that there's no international standard code for them. Operating systems, distros and even some applications, prefer something of their choice as far as I can see. Mostly they are similar to the language codes, but for the variants, naming varies to taste, to some extent. To see what GNOME, Ubuntu or the default applications we use prefer as an abbreviation for Latin American keyboard layout, I added it to my Ubuntu 10.10 via System -> Preferences >- Keyboard -> Layout -> Add > By country via Argaetina or by language via Spanish lets say > Latin American. Then the Indicator Applet appeared on the GNOME Panel and it prefers the abbreviation LAm for the Latin American layout. So you may prefer the same to be consistent with the mainstream GNOME, Ubuntu preference, or you may prefer something else.

  • Right. What is confusing here is that the Ubuntu language indicator seems to look for flag-image filenames based on a two-character code and these codes oscillate between being codes for a language (es, ar) and being codes for a country (us, il). They don't correspond to the three-character codes that the indicator outputs if you have flags turned off.
    – monotasker
    Oct 22, 2010 at 17:35
  • I downloaded the XKeyboardConfig software's latest source (2.0) from here and in Symbols directory in it, for example, there's a file named latam. Even if its a 5-charecter abbreviation, it seems to act at the same level with some 2-charecter abbreviations. So, technically, programs seem to refer to that layout as latam. Then, their way of expression in GUI to the user may be different I think, as in the example of Indicator Applet's LAm So, maybe JanC has given the correct answer at the very beginning. Oct 22, 2010 at 18:31
  • The layout's short description, “LAm”, is what the keyboard layout indicator icon for Ubuntu 11.04 will use as text (it won't be country flags!), the filename will be latam.png or latam.svg or something like that, so based on the layout name.
    – JanC
    Oct 22, 2010 at 23:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .