226: support locale variants #747
I’m not sure why the code invokes iso 629-2 codes. BCP 47 Tags should be used.
I don’t have a problem with the fallbacks chosen. They make sense. But it seems that the coding seems more complex than needed. ISO 639-2 and 639-3 are alligned for the purposes of locale codes CLDR or Iana should have the already Approved codes.
Any idea of progress on this PR?
While discussing about the details could take forever (this language is/is-not a variant of another language), the functionality itself it's extremely useful for cases that are clear. For example, we now have *Valencian (ca-valencia, Catalan as spoken in Valencia), and falling back to English is simply not an option: there aren't enough translators to keep all themes/plugins up to date in both variants.
Also add a link back to the root translation in the detail view.
If someone is using the locale file outside of WordPress, the lack of apply_filters() would cause a fatal error.