I have a very simple app which only contains a
UIAlertview and less than 8 views. What I want is:
I have a main view which contains two buttons one says English and the other says French.
What in my mind is:
When the user hits
English it'll take him to the Project I have right now,
However, when the User hits
French it'll take him to a duplicated views that I'd simply and manually change and translate it's labels into French.
** Now my question is ** how do I translate the
LocalNotification and the
AlertView? and how to connect the French button to these translations?
From what I've googled and read here in SO is that I can get the strings out and list them into Localizable.strings but I still don't know how to make my french button ask for these strings? Also, is there an easier and simpler way? any idea?
Kindly try this for doing localization
For buttons use something like this
[self.yourButton setTitle:NSLocalizedString(@"YOUR_KEY", @"Comment") forState:UIControlStateNormal];
Do not duplicate your views and view controller just for the sake of localization, considering that for both languages have the same layout and everything only thing that would change is the language. So add English strings and French strings to your project and use NSLocalizedString to get these values.
Note:NSLocalizedString works with device language only so if you want to change the app's language manually try this. I have used AMLocalizedString in many of my projects and they work fine.