I’m developing an app that require a localization at run time, i mean that it will be a button to change the language instantly, i’ve searched about localization and what i’ve found is how to localize the app depend on the iPhone international language.
I’ve localize all the nib files i have and redesign each nib file according to it’s language, but how i can change the nib file when the user click on the button ?
any help will be appreciated.
Mainly you can use a project created by someone: Advance Localization in iOS apps
Or there is another method, to implement it by yourself.You must have all localization files in your project:
This code is good for what you need. But this is only the base. So each text must be loaded with the
get:alter:method, so it will be loaded in the correct language. As you see at initialization this class will use the system language, but after you call thesetLanguagemethod, then it will use the language you’ve setup. After you set a language with theget:alter:method, you should reload all your text in your view controller, by calling theget:alter:method again for each text that appears and set the result to the desired label or textfield or to any otherNSStringtype parameter that needs i18n. So there is more work, but this is a very good base. I don’t think it can happen automatically, you have to code.