Ios applications are internationalized and ios applications are internationalized.
1. program name internationalization:
After creating a project in Xcode, you can find the Localization project on the info tab of the project, and add the international languages that the application needs to support.
When you return to the project, you can find in InfoPlist. strings, Main. storyboard (Main. strings) adds corresponding items, while Localizable. if the strings file already exists, the corresponding language version is also added. (By default, the Localizable file in Xcode5 + iOS7 needs to be created, as shown in)
After completing the preceding settings and adding files, you can see the ABC of internationalization of the application.
International Application name (InfoPlist. strings)
Set the display name of the program in the corresponding language in the file of InfoPList. strings in different language versions.
English version
/* Localized versions of Info.plist keys */ CFBundleDisplayName="test";
Chinese Version
/* Localized versions of Info.plist keys */
CFBundleDisplayName = "test ";
2. International content
Similarly, content in the application (Component display name, prompt, etc.) can be configured in the form of key-value pairs in the corresponding file Localizable. strings;
English
/*
Localizable. strings
LocalizeMe
Created by gisxy on 14-3-5.
Copyright (c) 2014 esrixa. All rights reserved.
*/
"Abc" = "CBA ";
"Message" = "this is english ";
"OK" = "OK ";
Chinese
/* Localizable. strings LocalizeMe Created by gisxy on 14-3-5. copyright (c) 2014 esrixa. all rights reserved. */"abc" = "I'm a test"; "message" = "this is a Chinese message prompt"; "OK" = "OK ";
Note that the Code should use NSLocalizedString (@ "key value", nil) for the code prompted)
UIAlertView * alert = [[UIAlertView alloc] initWithTitle: NSLocalizedString (@ "abc", nil)
Message: NSLocalizedString (@ "message", nil)
Delegate: self
CancelButtonTitle: NSLocalizedString (@ "OK", nil)
OtherButtonTitles: nil];
[Alert show];