I'm unable to get the correct localized german strings from the Localizable.strings file. My app setup looks like this
Main.storyboard
- Main.storyboard (Base)
- Main.strings (German) -> these strings are translated correctly
Localizable.strings
- Localizable.strings (English)
- Localizable.strings (German) -> can't get these strings
Inside the app I'm trying to get the string like this
NSString *item = NSLocalizedString(@"Group expenses", @"Menu item");
The Localizable.strings (German) file looks like this
/* Menu item */
"Group expenses" = "Gruppenausgaben";
When I set a breakpoint after item
I always get the English string back, however the path for the resource seems correct NSString *path = [[NSBundle mainBundle] pathForResource:[[NSLocale preferredLanguages] objectAtIndex:0] ofType:@"lproj"];
gives me: /data/Containers/Bundle/Application/5E3ED6BF-71E1-4C60-9EDA-610C9A32B8EF/MyApp.app/de.lproj
I also have localized the string file
It's also included in Copy Bundle Resources
I tried several answers from different questions here on stackoverflow, like deleting app and do a clean (shift+cmd+k), setting application language under
Edit Scheme
, ...