In an iOS5 app, I have a UITextView with data detectors for phone numbers and so on. When I tap the underlined link / detected data, everything works as expected, but when I tap that link a little longer, an UIActionSheet appears (Call xyz, Add to Contacts and so on). This is fine as well except the language of those buttons English but it should be German. I already set the default language of the app to German in xcode and also deleted the English localization but the button titles remain as they are. Is it possible to change the language somehow?
Found the answer myself. Originally, I thought I need to have the English localization because when I deleted the (only one) localization, the storyboard file was deleted as well. The solution now was very simple. I added the German localization (the storyboard is copied) and then deleted the English one. This way the action sheet buttons are German now and the storyboard file remains in the project - problem solved.
Sorry for being too stupid to try this before :-/
Related
I'm trying to make my app accessible with Voice Over. On one of the screens I have a text field for entering number. Nothing special, just default UITextField with keyboardType set to UIKeyboardType.numberPad. Voice Over is actually working well and read all selected keyboard buttons. The problem is that keyboard is always english (with english letters under digits). And when you switch iPhone language to something other than english, Voice Over mixes two languages:
When you select digit on keyboard with single tap, Voice Over read it in current iPhone language (russian in my case)
When you double tap (to enter digit into text field), Voice Over always read it in english
What I changed in setings:
Set iPhone language to russian
Set region to russia (not sure if it matters at all)
In "General -> Keyboard -> keyboards" moved russian keyboard to the top of the list
But nothing helped. UIKeyboardType.numberPad and UIKeyboardType.decimalPad are always english (UIKeyboardType.default is russian as it should be)
Am I missing something?
I also tried to change keyboard language programmatically - iPhone: Change Keyboard language programmatically. But that didn't work either.
It's confusing for sure, but it sounds like your app is not actually localized for Russian. Try localizing it and see if that improves things.
everybody!
I've been struggling with fixing one issue in one of the apps that we are working on for the whole week now and I didn't get any idea of the reasons and possible solution. Could you please help me out - maybe some of you encountered the same problem:
Initially the issue has been reported in just one project, but then I also tried to reproduce it in other apps - in some of the apps the same problems was present, in some everything worked properly.
So the problem:
open the app
select any text field
try to select Japanese keyboard (keeping in mind that the
language has been already added in the settings of the iPhone)
Actual Result: Japanese keyboard is not being displayed in the list of available keyboards in the app
Expected Result: Japanese keyboard should be available in the list of available keyboards and user should be able to input text in the text field in Japanese
I would really appreciate if somebody could share some additional insights. Or maybe ways you fixed it in case you came across a similar issue.
Thanks!
It may be caused by the text field's keyboard type.
Make sure the keyboard type is default or another, appropriate, non-ASCII-compatible type.
textField.keyboardType = .default
The keyboard type for a text field or view can also be configured in Interface Builder.
See also:
the keyboard type property for UITextInputTraits-conforming classes
all available keyboard types.
I have a Storyboard in Xcode 5.1 with a base Localization of English, and a second Localization in French.
When I'm using the Xcode Storyboard editor the strings are shown in English, as expected. Is there any way to make Xcode display the Storyboard in my other localization (French)?
I don't want to change Mac OSX's language, I'm hoping there's an option in Xcode somewhere.
EDIT: I have this in my resources folder
If I double-click Main.storyboard then the storyboard opens showing English (base language), as expected.
Is there a way to view Main.storyboard, but showing the text displayed in Main.strings?
EDIT:
I've since discovered (thanks to this tutorial) that there's a 'preview' option in Xcode. To get this, open the storyboard, click the 'assistant' editor, click the 'assistant editor menu button' (immediately to the right of the > arrow at the top left of the assistant window) and select Preview. This shows how the ViewController will look in landscape/portrait 568/480 high modes. Very handy, but still shows everything in English.
If only this'd let me select a localization, it'd be a great way to check the text layout works in different languages..
I believe that Xcode is not prepared to show localized storyboards in Interface Builder when using string files. However, it allows for you to convert formats quite easily. Select your storyboard file and in the utilities panel, select the language you want to preview:
Change the "Localizable Strings" to "Interface Build Cocoa Touch Storyboard":
You should now be able to select the French storyboard file and preview it within IB.
Once you are done, you can convert the file back to "Localizable Strings" reversing this procedure, or using your source code version control system. Then you can update the base file with any necessary adjustments, and verify it is to your liking using this method again.
Xcode 6 now includes a feature to do this.
From What's New in Xcode - New Features in Xcode 6:
Preview in Interface Builder. While designing in Interface Builder, the preview assistant can show how the interface appears in other languages. You can see how your interface responds to longer or shorter languages.
Hurrah!
Just click on you storyboard file and you can devellope it to show your Localization storyboard.
In Your case if you use the localization "base" option, you must see 3 storyboard file (one for "base localization", one for english and one for french).
Sorry for my english but i hope that help you.
I have a project in Xcode 5.0 and I want to support only a specific language different from english, for intance, pt. When the project is created, it has "Use base internationalization" checked. A tried adding my language and removing english, then when I run the app on a device of that language (pt), everything is ok, the controls of a image picker, for instance, are localized. But, if the device's language is english or a different one (for instance fr), the controls are shown in english. How can I force the app to show all controls in my language (pt)?
Maybe it is noob question, but when I uncheck "Use base internationalization" I lose the storyboard, and when I try to check again it asks for files but no options are shown. How can I change the reference language of base internationalization?
I need to translate an iOS-Application within two days, but my XCode versions (4.4 and 4.5 Developer Preview) both don't give me the option to add another language. I only get the option to click "Make localized.." but I can only choose english and after choosing it, there are no plus and minus buttons in the utility inspector in Xcode - with no file or project i tried.
Am I missing something here?
Edit:
This is how it looks like:
It moved to the starting in Xcode 4.4 .
I just meet with this problem and I was using xcode 4.5 preview 3. Couldn't believe apple have made this kind of mistakes and not fixed it even when its at preview 3. Therefore I believe they just have changed the way localisation work so I poke around the UI until I finally found it.
They have shifted it. You first have to add the language you want to the project first. Then after it will appear as a check box item in the UI you show. To add the language you need to click go to Project -> Info then click "+" to add new localizations.
Hopes that helps.
The buttons scroll out of view when the "+" is used to extend the list. Use the mouse to grab the bar right below the list of localizations and drag it down to make more room, and the buttons will be visible again. Then you can click on the "+" to see a menu of additional localizations.
It seems Xcode 4.5 DP3 completely miss the +/- buttons in the localization pane.
I tried Nyon solution to add an additional language (actually before seeing this post).
Doing so, I can add a language into the project but I cannot use that new language to localize my files.
But thanks to him, I know now that it is the issue with Xcode DP3.
So, what did was very simple: I use the old Xcode 4.3 to localize my file (with + button in the localization pane).
Then, I have two versions of the files (one for each language, nicely organized into appropriate lproj).
Then I switch back to Xcode 4.5 DP3.
Now, both languages (en and the new one) appear in the localization pane.
And this time, for all my files!
That is, you have to add a language only once in Xcode 4.3, afterwards, the new language will appear in your language list as it should be.
You can add languages in Xcode 4.5 like above.
I think the answer is not complete!... If you start a project for a non English, Japanese, French or German language (in xCode 4.6), then you will be a bit lost on how to localize your resources.
If you just go and try to add a new language as stated by kamesh above, you'll find you can't if you didn't FIRST localized at least one of your resources in the default provided languages by xcode.
So, localize at least one of your resources needed to be localized, and then, add the language you need to add as kamesh, then the next modal presented by xcode will let you add any resources to that new language. (not very intuitive and definitely not documented by apple.)