سؤال

I created 2 InfoPlist.strings, one in portuguese and the other in english. i use my string in .strings file like this:

"BtnTitle" = "Title"; (English)
"BtnTitle" = "Título"; (Portuguese)

when i debug either in the simulator and in the device gives me only : BtnTitle as the result of the NSLog :

NSLog(@"Titulo : %@", NSLocalizedString(@"BtnTitle", @""));

The Log dont give me the property of the object "Title" or "Título", but the object name "BtnTitle"

هل كانت مفيدة؟

المحلول

InfoPlist.strings is localization for Info.plist. UI strings should go in Localizable.strings.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top