I'm now translating my app. I've already translated every view and data inside the app but I've also some settings for the app in the Settings menu of the iPad. All of them are in Spanish and I would like to translate them depending of the language set on my app (or set at system settings, never mind). I'm attaching a little screenshot of my settings Screen.
How can I translate it?
Thanks!
Related
I want to change the keyboard language programatically for my XCUITests to try various different keyboards. I've tried:
XCUIApplication().launchArguments += ["-AppleLanguages", "(fr)"]
XCUIApplication().launchArguments += ["-AppleLocale", "fr_FR"]
But this only changes language and locale, but it still keeps simulator default keyboard. I know I could probably do it by going to the settings app (inside of the UITest) and just change keyboard, but I'd like to do it as an input argument or similar.
I also don't want to have all keyboard languages installed on the simulator at the same time, only the one language I choose.
How can I accomplish this?
Since you do it in Simulator, you can access the entire macOS disk space, including Simulator support files.
Each simulator has its own setting located in
$HOME/Developer/CoreSimulator/Devices/SIMULATOR_ID/data/Library/Preferences/.GlobalPreferences.plist
In this file, you can change AppleKeyboards programmatically.
New path for .plist file to change properties of keyboard from Roman Zakharov's answer:
/Users/YOUR_USER/Library/Developer/CoreSimulator/Devices/YOUR_SIMULATOR_ID/data/Library/Preferences/com.apple.keyboard.preferences.plist
Simulator ID can be found from Xcode: Window -> Devices and Simulators -> Simulators. The Identifier value is the UDID.
After a bit of research, and have tried this, but it is not working for some reason. Here is the setup..
In the "root" of the app there is a Default.png and a Default#2x.png. These seem to be working fine.
In the ru.lproj directory right under the "root" directory....copies of the Default files with small changes. The files are confirmed to be loaded on the iPhone....etc.
When the language is set to russian, it loads the high level splash instead of the russian screen.
Anything else that has to be done for this to work properly?
Platform is SDK 4.3
if you want it to be localized: none of it should be in the root, both of them should be in a localized folder, one for ru, one for english (or else)
you should do it via xCode:
in xCode select the splash screen file in the left part of your project and press "apple+i" (or press the blue "info" button in toolbar;
then in the opened window press the left-bottom button "make file localizable", then add all the language you want... you will get as many folder in finder... now just modify the file in the folders for "ru", "en" or else...
NOTE: I have rephrased the title because I'm not getting any answers. Surely someone out there has experienced this problem and knows what to do. Thank you!
I have an iPhone web app that works almost perfectly in Safari on the desktop. Only two things do not work correctly on the desktop:
Radio buttons do not appear. They are operational because you can check one if you know where it is; it simply is invisible.
When SELECT is used, the little box with the default selection in it and the little down arrow do not appear. However, the actual text of the default selection DOES appear. If I click on that text the drop-down menu appears as it should.
In both cases the problem seems to have to do with icons missing or not rendered as needed.
What is the problem and how can I correct it?
Thank you.
Dave
Have you tried changing your user agent to Mobile Safari? If you turn on the Develop menu in Safari advanced prefs, you can then test the app in different environments. It's just a thought.
I manage to localized app icon and app name for different languages.I found the icon changes depending on the language setting on the iphone only when the first time when you install the app from xcode.
after that, if i change the language setting, the app icon stay the same but only the app name changes to the localized one.
Anyone has an idea is there is way of solving the problem? it seems iphone doens't refresh the icon after you change the language setting.
Tony
I am going through the same problem right now and my conclusion is you are right. There seems to be no way as of now to change the icon on the fly with the language settings.
Have you tried cleaning (Build > Clean or Cmd+Shift+K) before changing the language setting and rebuilding your entire project? I find doing that fixes my app icons all the time. Also, be sure you're changing your iPhone Simulator language settings and not your Mac OS X language settings.
How do I create a preference pane for my app on Mac. Also, how do I make a preferences section for my app in the iPhone?
Your iPhone app needs a Settings bundle if you want to have your preferences in the system preferences.
http://developer.apple.com/iphone/library/samplecode/AppPrefs/index.html
You can create your own preferences view in your app on either platform. This is done by creating a view controller or window controller like you would any other view controller/window controller and you can use NSUserDefaults to store/retrieve the information you obtain from your user.
To put settings inside your application you might want to consider mySettings, an open source (EPL) framework for doing much of the hard work. After making a small code contribution myself I decided against including the setting inside my app after all.
For the Mac, you may wish to consult Apple's Preference Panes guide.
For Mac OS X, i would recommend my RHPreferences framework.
Available on GitHub. BSD Licensed.
Its a simple and easy Preferences window controller with multiple tabs for your next Mac application.
It also provides:
Auto resizing between different sized tab views (With animation)
Custom NSToolbarItem support
Persistence of the last used tab
Support for placeholder NSToolbarItems (eg NSToolbarFlexibleSpaceItemIdentifier & NSToolbarShowFontsItemIdentifier)