IOS language internationalization configuration, ios language InternationalizationThe so-called iOS internationalization means automatic switch based on different languages of the system. First, 1.png creates. strings file, with "Localizable. strings "is the file name: 2.png
In the development of iOS, many times the components are dragged out, directly in the story version (storyboard) directly to use, and did not do output association, or some Uilabel only display, will not be modified. So in this case, it will not be modified in the code, you need to use the story version of internationalization,Before xcode4.5, if the story version of in
The development of mobile applications is more likely to attract more users to the world, which requires the application to be internationalized. Internationalization is actually a multi-language process. This article introduces the internationalization of Xcode4.5 and later, including Internationalization of application names and application content. For version
1. In project settings, join Chinese and English in two languages:2. Create a new localizable.strings file, as a multilingual dictionary, store multiple languages, click on the right side of the localization, check the English:3. Add a field,In 中文版, add: "submit_btn_title" = "Go";In Chinese, add: "submit_btn_title" = " start ";4. A tool class Gdlocalizablecontroller. To switch the local language:gdlocalizablecontroller.h//guide-book////Created on 7/16/14.//Copyright (c). All rights reserved.//#i
Implement interface localization (internationalization) for IOS and ios
When creating an application, you can use the localization function to translate the content of the application into multiple languages and display different languages in different regions. The following describes how to use localization in simplified Chinese.
1. enable applicat
Definition of nslocalizedstring
Look at the Macro Definition section: (Original address: http://blog.csdn.net/aries4ever/article/details/8185405)[CPP]View Plaincopyprint?
#define Nslocalizedstring (key, comment) \
[[NSBundle Mainbundle] Localizedstringforkey: (key) value:@"" Table:nil]
The second parameter, Comment, can be nil, a string that is empty, or a comment to keyThe first parameter, key, reads the corresponding Key-value value from the Localizable.strings file.
Body
First, prepare
Push Local International official documents:
{"APS": {"alert": {"title": "Shou", "Loc-key": "Notification_push_live", "Loc-args":
["over140", "Broadcast test"] }, "badge": 0, "sound": "Default", "Content-available": 1}}
Nwpusher Test Push content:
Write in En.lproj/localizable.strings (System language default English):
"Notification_push_live" = ": Space_invader:%@ is broadcasting%@";
Ii. Issues
After receiving the push, the body directly shows the notification_
Introduction to localization/internationalization of iOS language (graphic)Language localization, also known as language internationalization. is to automatically set the language of the application to a language consistent with the language of the user's operating system, based on the language settings of the user's operating system. Often some applications need
Internationalization of iOS applications: preparation for internationalization of programs1, first we have to create a project, we give him the name Internationalization-demo, and then add the language.To detach text from your code:Currently, all the text shown in the app is in Main.storyboard and viewcontroller with h
Tags: ios internationalization iOS multi-language support Xcode multi- language support Xcode build multi -language internationalization it
Category: Functional knowledge
If your app needs support for multiple languages. Then, you should add "internationalizati
Storyboard The Inspector column of the localization (left), project file Navigator There will be a few more files (figure right) 2 internationalization follow-up optimization The shortcomingsIn fact, the internationalization of iOS has been completed, but you may also find a problem, the above two methods are all a one-time generation of files, but our pro
reference article, there are a lot of good detailed handouts.Reference article:
Localization native Development Region change language is invalid
How to set the default language in iOS
Xcode 6 about the internationalization of IOS apps
iOS learning iOS program nam
may be displayed in different environments.OK below we drag a picture into the project and then clickOr the same as above, choose a good language.This will be the case when done.If you want to Chinese pictures do not use this, for another, then we click on the image of the Chinese version of the right button, select Show in the Finder will be in the folder to delete the image and then will be changed to add the picture, note the name to be the same as the original.Okay, run and try.5 The
The original address http://www.jianshu.com/p/63a1c1a40b93http://www.cocoachina.com/ios/20151120/14258.html, procedure internationalization preparation work:1, first we have to create a project, we give him the name Internationalization-demo, and then add the language. To detach text from your code:Currently, all the text shown in the app is in Main.storyboard an
IOS internationalization multi-language settingsWay One:1. Create a good UI in storyboard, then add the language you need in Project Localizables, and the default is englist; For example, here I have added Simplified Chinese2. After the addition, the original Main.storyboard will be a more international language configuration file3. Click on the main.strings file, you can configure the Chinese language here
iOS internationalization and genstrings localization strings for all subfoldersIn a recent busy external project. Work overtime every day. There is no time to update the blog. Simply talk about the internationalization of knowledge. First, we use strings. Must be nslocalizedstring (key,comment), so we are different localizable.strings specify different values
language pack is switched. Add language support. Let's take my file as an example: in Localizable.strings (Chinese (Simplified)), add the following code:"Play" = "play";In Localizable.strings (中文版), add the following code:"Play" = "play";Other, identical ...Use language supportNSString *strplay = nslocalizedstring (@ "Play", @ "");[Self.btnplay Settitle:strplay Forstate:uicontrolstatenormal];get the language of the current device Get user default informationNsuserdefaults *defaults = [Nsuserdef
-Cself.lblText.text = NSLocalizedString(@"Hello", @"")//SwiftlblText.text! = NSLocalizedString("Hello""")The iphone language can be set up and run to fit, shown below, complete the relevant content in English and Chinese adaptation:Project name InternationalizationThe steps are the same as above, just a few different points.1, the file name is called Infoplist (. Strings)2, the content of the form ofCFBundleDisplayName = ""The landlord in the corresponding document in the following wording://适配中
First, the internationalization of the preparation of the process:1, first we have to create a project, we give him the name Internationalization-demo, and then add the language.To detach text from your code:Currently, all the text shown in the app is in Main.storyboard and viewcontroller with hard-coded strings. In order to localize these strings, you need to put them in a separate file. Instead of hard-co
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.