SwiftMoment icon indicating copy to clipboard operation
SwiftMoment copied to clipboard

Device using Traditional Chinese in Taiwan (zh-Hant-TW) returning empty string

Open samwize opened this issue 7 years ago • 1 comments

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: -

samwize avatar Jan 25 '18 03:01 samwize

I have fixed in my fork here: https://github.com/samwize/SwiftMoment/commit/41e2b524bceb2281f36ef598a1dcab5e0b58e92e

What do you think?

samwize avatar Jan 25 '18 04:01 samwize