I want to have an option in my application to change my application language (just application language not the whole system), would you please give me some hints?
Thanks in advance,
I know about localisation!
You can do this by using custom build flags that you set up from Xcode. This way you can run an application under a localisation rather than changing all the settings for the device.
I wrote a blog post about it at http://abizern.org/2012/03/18/simple-localisation-testing/
And there is an example project on Github that you can use to see it in action: https://github.com/Abizern/SimpleLocalisationTesting
I've made custom localization made by .plist filled with array of dictionaries. Like this:
kYes
en = @"Yes"
ru = @"Да"
kNo
en = @"No"
ru = @"Нет"
In my project I made a singleton class for reading this strings. In options user selects needed language (at first start app select language from current system state or sets default one). Selected language must be saved in file or in settings to use on the next start.
In singleton I have +getStringWithKey:
. So I pass there @"kYes" and get string for current localization for app only. Also, you will need to add standard localization files to project anyway, even empty, because if you don't, all languages you support will not be shown in iTunes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With