i18next v26.5.10

v26.5.10
Changed 1
  • A two-letter language code no longer matches a supported three-letter code that extends it, so ar no longer matches arz-EG, sw no longer matches swh-KE, and no no longer matches nob-NO; list the two-letter code in supportedLngs or map it with fallbackLng to keep this behaviour behavior changed · inferred, marked in the notes below
Fixed 1
  • When none of the detected languages is in supportedLngs, the best match no longer picks a different language whose code only shares the same leading letters, so a Finnish user (fi-FI) with supportedLngs ['en', 'fil-PH'] no longer gets Filipino and ha (Hausa) no longer picks haw-US (Hawaiian)

1 change to check, marked in the notes below

From i18next

  • fix: when none of the detected languages is in supportedLngs, the best match no longer picks a different language whose code only starts with the same letters. The last fuzzy check took any supported code starting with the language part, so with supportedLngs: ['en', 'fil-PH'] a Finnish user (fi-FI) got Filipino instead of the fallback language, and ha (Hausa) picked haw-US (Hawaiian). Other regions of the same language still match as before (de-CH → de-DE, pt-PT → pt-BR, fil → fil-PH). Compatibility note: a two-letter code no longer matches a supported three-letter code that extends it, like ar → arz-EG, sw → swh-KE or no → nob-NO; list the two-letter code in supportedLngs (or map it with fallbackLng) if you relied on that. Thanks @Pharex38 (#2460). behavior changed · inferred
View original

Upgraded? How did it go?

Discussion