As I know, localization is mainly depends on the language,region setting of the iphone.
My application would like to provide two language support: English and Chinese.
So, I have localized the string and the nib file.
If the preferred language of the phone is English. Is it possible that I can programmatically change the preferred language to chinese, such that the user can swap between chinese and english in my application without change the setting inside the phone.
I was just searching the forum for solution of similiar problem, but I wasn't able to find the answer
I want my application to support, let's say, two languages: English and German. When user presses the appropriate "Change language" button in "Options" view, all elements of user interface based on language i.e. titles on buttons, text in labels, etc. should change immediately.
Could this problem be solved with the use of Localizalible.strings or do I have to solve it by myself?
You can user the Localizable.strings - I do the same
Thanks, it is good to know, but I was wondering if you could attach some code - I'm especially interested in method invoked, when the button is pressed - how to make the language change - how to make used Localizable.strings "swap"? What should I do?
It would be great to change the language programatically within the app but if you are using localizable strings etc to determine language then it isn't going to be possible. That system works on NSLocale which is set in the device settings and you cannot change it.
The only way to achieve this would be to write your own classes for the localization.
Thanks, it is good to know, but I was wondering if you could attach some code - I'm especially interested in method invoked, when the button is pressed - how to make the language change - how to make used Localizable.strings "swap"? What should I do?
Thanks for your reply!
Here is some testing I have done now. I can programatically force to load the view while ignoring the phone's setting
Here is some my sample Code
I use English and chinese as my application language