I've been using localization in my app, but for some reason, some of the strings (not all of them) won't translate, I see the key instead the value. I've tried to check if the app finds the localization files by doing this:
NSString *enPath = [[NSBundle mainBundle] pathForResource:@"en" ofType:@"lproj"];
NSString *hePath = [[NSBundle mainBundle] pathForResource:@"he" ofType:@"lproj"];
NSString *ruPath = [[NSBundle mainBundle] pathForResource:@"ru" ofType:@"lproj"];
NSString *esPath = [[NSBundle mainBundle] pathForResource:@"es" ofType:@"lproj"];
NSString *frPath = [[NSBundle mainBundle] pathForResource:@"fr" ofType:@"lproj"];
NSString *arPath = [[NSBundle mainBundle] pathForResource:@"ar" ofType:@"lproj"];
And none of them is nil.
I've checked the name of the localization file and it's Localizable.strings
as it should be.
Also checked if the key exists inside the Localizable.strings
files and it does.
I've also tried:
- Empty Cache
- Cleaning all targets
- Delete Derived Data folder
- Restart
- Reset simulator
- Convert to UTF-16
- Remove all localization files and recreate them.
Also tried to do everything that is in this question.
It's important to say that this is not just a Simulator/Cache problem. It's also showing on devices which download the app. (I have Enterprise account).
What more can I do in order to identify nor fix the problem?