Best way to implement RTL in Swift? - swift

I want to present my app in Arabic RTL language when user clicks on the Arabic in the language selector inside the app(default language is English). I have referred lot things, still I am unable to get perfect output. Anyone, please suggest me an best way to do this.

Related

DETECT Speaking Language- iPhone

I can covert the speech that a user spokes to text using Open ears (see http://www.politepix.com/openears/yourapp). But How i could detect the language which the user speaks is English, french, chinese etc... Is there any method to understand in which language the user speaks? How can i check this.? Any help would be appreciated. Thanks
Can I play any thing with this
- (NSError *) generateLanguageModelFromArray:(NSArray *)languageModelArray withFilesNamed:(NSString *)fileName;
I don't think you are able to do so. I'm backing my claim with the need to set your language in every speech to text application, Siri included. You either have to wait a few more years, or invent a new algorithm which will eventually make you filthy rich.

Localization issue in iphone

I need to make an application in which the user can toggle between two languages on triggering a click event on a button.
The problem here is that I have seen examples in which, if we want to load our localized nib file, then we need to change the language from the settings options and we can get the proper nib file loaded according to language selected.
I want to do this within my application, meaning I don't want to go to the settings menu and change the language and then reload the application.
I just want the above effect within my application (that is, through a button click event the app should be able to toggle between two languages).
Is it possible, and does Apple allow it?
Nobody here can tell you whether Apple will allow it, but if your app is well designed and there's a good reason for this departure from the usual way of doing things, you've probably got a good shot.
There's nothing to prevent you from loading a nib file localized for a different region. I'd probably avoid trying to use Apple's automatic mechanism, though. Just name your nib files using some pattern and load the appropriate one.
If you want your life to easy, you will take advantage of the Localization built into the operating system. Otherwise, you will have write your own methods to load localized strings or nib files.
There is no reason for Apple to reject an app that shows localized text based on an in-app setting. I work to help developers localize apps and, although I don't suggest this approach, they have done it and I've never heard of a rejection from Apple.
What you won't be able to do is use Apple's built-in tools, which rely on the system settings to determine a user's language and push the text from a Localizable.strings file. But it honestly won't take you too long to implement a similar system yourself using functions akin to gettext.
You essentially need to implement the same basic logic as any localization system:
1) Surround your in-app texts in a function that will display the proper language based on the user's chosen settings
2) Export your source texts (probably English into file
3) Translate the English strings into each language in a separate file
The function you write can follow the lines of gettext, which has examples in many programming languages. If the settings is "French" grab the equivalent string from the French file. If the setting is English, just print the English.
You won't be able to use Apple's tools, but you CAN do it on your own and Apple won't really care as far as I know. However, if you choose to localize into an Apple-supported language, follow this app localization tutorial for iOS using the standard Localizable.strings method.

iPhone - programmatically select language keyboards

I'm writing some apps that have multiple languages. I know I can set up the devices to have international keyboards.
What would be terrific is if there was a way to select the English keyboard for the english words and the specific foreign keyboard for each language that I use.
Does anyone know if this is possible, and how?
It's up to the user which keyboards they use at all times. If they have multiple languages enabled then they can switch between them freely without leaving the view, as an extra button is added for the purpose. You can't give a hint as to which language the user is likely to want.
Those properties you can adjust are given by the UITextInputTraits protocol, so that should give a full list of things you can specify. I believe they're all exposed on the relevant controls by Interface Builder and/or Xcode 4, so shouldn't be much of a surprise.
I'm sorry to disappoint you, but what you're asking is simply not possible.

How to change all the strings in an iphone application with respective selected language in settings?

I need help from you, I need to display all the text, labels , strings and what ever text is showing to user in the iphone application with respective selected language in settings of iphone.
for example user selects German or French in settings of iPhone language, then my application should provide or view the details in that language.
I need sample code for localization, Is there any simple way to follow the standard steps to translate the code to different languages in iphone sdk.
please healp me, I hope that I can get efficient solution on this from you.
Thank you,
Madan Mohan.
See here: http://www.icanlocalize.com/site/tutorials/iphone-applications-localization-guide/
I think the previous link gives a pretty good idea of how to do I18N on the iPhone, but if you feel you need more info, you can try this article http://blog.federicomestrone.com/2010/05/18/internationalise-your-iphone-apps-with-xcode/ which is just slightly more code-orientated.
The point though is always the same - you have to separate code from text resources and load all your text (strings) with the NSLocalizedString macro, or a variant thereof.

How to provide easy multilanguage text in iphone app?

I have some short text that I want to ship in the currently active language. What's the most easy way to do it? Example: I have the text "the cat", but when someone from spain uses the app, he/she wants to read "el gato". Is there a standard way to do it easily with UIKit? They're pretty simple texts only. I can imagine some kind of property list and feeding it with a key and locale, and getting the appropriate text snippet out of there.
Check out NSLocalizedString.