I create tow Localizable.strings files one for english and the second for arabic :
/* The number 1 */
"LABEL_ONE" = "label number one";
I am using this code to get the string value:
[self.Lable1 setText:NSLocalizedString(@"LABEL_ONE", @"The number 1")];
but the app show "LABEL_ONE" instead of "label number one" ? What's the problem ? Thanks
Your string files name have to be Localizable.strings.
In addition to the top answer, the localization file has to be named Localizable.strings
and not anything else.
Your code is correct, so the problem is elsewhere.
Here are some possibilities:
Localized.strings
file is not copied into the application bundle. To verify this focus on the Localized.strings
file using the 'Project Navigator' and make sure your target is checked on the right pane under 'Target Membership'Localized.strings
file, i.e. missing ;
Localized.strings
for Arabic but is missing for English.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With