We have had a bug reported to us by one of our users about the localisation of the Tweet button. Until recent weeks, in their language (Spanish) the Tweet button rendered the text “Twittear”, it now renders as “Tweet”.
Our language codes for the Spanish locale are es-LA, es-MX and es-ES (for example), an it is these that we pass in to the Tweet button.
This should work because:
The languages presently supported by the widgets are: hi, zh-cn, fr, zh-tw, msa, fil, fi, sv, pl, ja, ko, de, it, pt, es, ru, id, tr, da, no, nl, hu, fa, ar, ur, he, th.
If an unsupported language variant is specified that isn’t supported, the widget will be rendered in the matching parent language: For example es-mx will be rendered as es.
It is the part in bold that no longer appears to be working correctly.
Please see this Fiddle:
Note the first two are typically what we would render in our application. The first has a language code of en-US for our default language English (US) - this obviously works fine. The second has a language code of es-MX. Up until recently this would work and display the word “Twittear”. Now, it seems, the unsupported language variant mentioned above is ingored, and instead renders the button in English. The third example with the language code of “es” is exactly how we would expect the second tweet button in the example to look.
With this change being undocumented, and breaking suddenly, I would suggest this could be a bug that may need to be looked into.
Any advice greatly appreciated.