What's the right way to add American Spanish to an extension?

AIUI, Spanish is largely the same across the Americas, and some software have just one translation for it, called es-AM or es-LA or similar. Is there a way to do this in Mozilla extensions?

(If I use es-AM and list it before es-ES in chrome.manifest it will be used wherever the language is Spanish but the country is not Spain, which is pretty close to what I want but it feels like a hack.)

Spanish isn’t at all the same across the Americas. There was an effort to create a unified Spanish in the past, but that didn’t succeed due to the differences.

Technically, the chrome registry is throwing dices on which spanish it’ll give you if it has more than one inexact match. If the underlying hashing code changed, it’d change, and there’s zero guarantees around this.

Also, please use standards-compatible language codes, there’s no such thing as Los Angeles Spanish, nor an Amheric version. See https://en.wikipedia.org/wiki/IETF_language_tag#ISO_3166-1_and_UN_M.49.

Reading https://dxr.mozilla.org/mozilla-central/source/chrome/nsChromeRegistryChrome.cpp#557, you’d want to have es-ES for Spain, whatever special latin american variants you want to support, plus es without suffix as fallback for the rest.