I have been using the Today Widget in my Swift program and have not had any issues, until I started using iOS 11 beta. Since then the Bundle Display Name is not getting localized. Within my Info.Plist I have:
<key>CFBundleDisplayName</key>
<string>NSLocalizedString(CFBundleDisplayName, nil)</string>
And in my InfoPlist.Strings files I have
"CFBundleDisplayName" = "Recent Chats";
If I display the widget on anything before iOS 11 beta, the String is localized properly, however when I use an iOS 11 beta device, the String NSLocalizedString(CFBundleDisplayName, nil) is displayed.
Does anyone know of a change in iOS 11 beta or bug that could be causing this issue?
Did you test on ios 11 simulator or real device? If you test on simulator, Please change simulator language from Settings>General>Language&Region in simulator.
Another interesting thing which i realize that if you use base.lproj as only English version and there is no such a English localization, when simulator language is changed to Enlish(U.S) or English(U.K), InfoPlist.Strings (Base) value is not shown.
Related
I use Localizable.string for each language that the project supports.
I also localized the storyabord file so I have a file with the info as these:
/ * Class = "IBUILabel"; text = "Subtitle"; ObjectID = "2Fy-d0-TVa"; * /
"2Fy-d0-TVa.text" = "Subtitle";
In my project I use NSLocalizedString to manage localization.
This has always worked well with
iOS 7.0 7.1 8.0
On iOS 8.1 I can no longer have the localized application correctly! I visualize all the details in English. This simulator is on both of the device.
Apple has broken something?
Localization in Xcode 6 has changed a little:
http://www.devfright.com/localization-xcode-6/
TL;DR:
It seems localization does not work with xCode 6.1 and 8.1 simulator.
Workaround:
Go to "edit schemes" >> "Run" (side bar) >> "Options" tab >> "Application Language"
Select the language you wish to run the app on the simulator.
Long Story:
I've updated xCode to 6.1. The update deleted the iOS 7.x simulators and left me only with 8.x simulator.
I've done the following steps:
I've installed the 7.x simulator
Cleaned the project
Deleted the app from the simulators
Deleted the derived folder for my project
The project supports English and Japanese.
on 7.1 simulator (5s) the localization works as expected.
on 8.1 simulator (5s) it does not work.
I'm guessing Apple broke something with the simulator, because it works on real devices.
Any input on this one, anyone else experienced similar problems?
EDIT
It seems like a bug in the simulator, reference:
Apple Dev Forums
This is mentioned in the Xcode 6.1 Release Notes and in other stack overthrow threads, like:
iOS8.1 Simulator always uses US keyboard layout despite german hardware keyboard
I just installed Xcode 6.0.1 (coming from Xcode 5.1.1) and tried to run my iOS app on iPhone 6 simulator for the first time. It builds and runs, but I cannot change its settings. I use NSUserDefaults for my settings. Each time I change settings, go back to the list of settings and then select my app's settings again, they are set according to the default settings.
When I tried to figure out why this could happen I noticed that changing settings of the standard iOS app Maps does not work either. I cannot change the distance setting from miles to kilometers. This happens with fresh iOS Simulator settings (I "Reset Content and Settings" several times) when simulating iPhone 6 and iPhone 6 plus.
Any ideas?
This is a known bug in iOS 8.0 in the simulator. The only workaround at this time is to set the preferences from the command line using the defaults command line tool.
defaults write ˜/Library/Developer/CoreSimulator/Devices/<UDID>/data/Containers/Data/Application/<App UUID>/Library/Preferences/...
You also need to find the relevant UDID.
This appears to have been fixed in Xcode 6.1 so consider updating.
This happened to me, too. It seems that the settings file is not saved at all.
˜/Library/Developer/CoreSimulator/Devices/[GUID]/data/Containers/Data/Application/[GUID]/Library/Preferences
is empty.
I've tried to use plist file from 7.1 simulator, but without any luck.
Downloading iOS 7.1 Simulator through XCode -> Preferences -> Download allowed me to save the settings, but that just for iOS 7.1.
I'm trying to use Base internalization to localize my app. What I did - I made two .strings files for English and Russian version (Xcode did it for me), but when I change any string in MainStoryboard.strings(English), with the iPhone to English locale and launch app in debug mode nothing happens, all strings are still in Russian. What Im doing wrong ?
If I change the language on an iOS 8.1 simulator to anything and try to detect this from code with
NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
NSLog(#"Language: %#", language);
I get "en" back. I've tried resetting the navigator, etc. I've tried this using the iOS 7.1 runtime (in Xcode 5.1.1), and it worked fine. Has anyone managed to find a workaround to this problem?
According to the release notes this is a known issue. There is a work around.
If you go to "Edit Scheme..." then the "Options" tab there's an "Application Language" option. This only affects the current run settings, not the app, much like changing the language of the device.
Another dupe of iOS8.1 Simulator always uses US keyboard layout despite german hardware keyboard
Known and documented bug as mentioned in the Xcode 6.1 release notes. File a radar if you want to add your +1 to the complaint list at http://bugreport.apple.com
My simulator is in French language. When I want to check interface in English then changing the iphone language is not enough. I have to switch the region settings minimum two times.
use [[NSLocale availableLocaleIdentifiers]
In my case, editing schema works for region but not for language.
It looks overwrite by development language.
Changing developmentRegion works fine with project.pbxproj like this.
developmentRegion = ja;
Xcode Version 11.3.1 (11C504)
iPhoneX iOS 13.3.1