iPhone: NSLocalizedString reading from English .strings file even when another lang is set

后端 未结 5 1700
一个人的身影
一个人的身影 2021-01-06 07:53

I have an app that has some non-US Localizable.strings files. They appear in the project as I expect them to: there\'s a Localizable.strings object, and sub objects for \"en

5条回答
  •  再見小時候
    2021-01-06 08:36

    For the particular problem of en_US always coming back, you need to be querying preferredLanguages for the array of preferred languages currently, not currentLocale.

    Does NSLocalizedString does not return the keyed string from the correct file?

    IN localization you have to be sure you are changing what you think you are changing. If you change Language in preferences then it will affect the string that comes back from your localizable.strings file. If you change settings under Region Format that's only date, currency symbol etc.

提交回复
热议问题