SwiftMoment
SwiftMoment copied to clipboard
Device using Traditional Chinese in Taiwan (zh-Hant-TW) returning empty string
Detailed Description
getLanguageBundle
is returning nil. Strangely, locale.identifier
is returning zh-TW
, without the "Hant".
The 2nd part of getLanguageBundle
therefore only get the language code as zh
.
Since now the bundle only has zh-Hant
, no localized string is found.
Context
Localization does not work for Taiwan app users.
Possible Implementation
I believe another fallback using Bundle to load will work.
Your Environment
- Version used: 0.7
- Operating System and version: 11.2
- Link to your project: -
I have fixed in my fork here: https://github.com/samwize/SwiftMoment/commit/41e2b524bceb2281f36ef598a1dcab5e0b58e92e
What do you think?