Our SEO guy asked us to change the Spanish language code from es-MX to es-US for SEO reasons. We currently use the dictionary to handle a lot of translated strings, so it seemed to make the most sense to create es-US as a new language and have it fall back to es-MX (which in turn falls back to English for terms we don't have translated). For some reason, though, the fallback skips right past es-MX and uses the English version. If I create a new version of the dictionary item in the es-US language it works as expected. And, of course, it's been successfully falling back from es-MX to English already.
So far I've:
- created the es-US language definition item [Master] System > Languages and set the fallback to es-MX
- ensured that both item-level and field-level fallback is enabled in the configs
- republished the site
- reindexed everything in SOLR
The code simply calls
Sitecore.Globalization.Translate.TextByLanguage() and stores the result on the view model, and I've confirmed that it's passing in the expected language code.
What am I missing?
(Sitecore 8.1u3, SOLR 6.1.0)