I’m looking at some example of using NSLocalizedString and there is a .string file in project where i can find:
"Loading" = "Wczytuję...";
And then in a app code i can find:
return NSLocalizedString(@"Loading", @"");
How can i create multilanguage version of my app using that? Or there is a other way?
I want to have button to change language.
That’s exactly how you localize an iOS app. Everywhere where you want to show some localized text you write
NSLocalizedString(@"Something", @"Optional Description"). Then you add a file called Localized.strings to your app’s resources and translate the text there:You can add new languages by selecting the .strings file and on the right side of XCode add a new language:
You can also have additional, separate .strings files in your project. Then you have to specify where to look for a translation:
NSLocalizedStringFromTable(string, filename, comment)