IOS development-iOS app localization-resource file Localization

Source: Internet
Author: User

Resource files include image files, audio files, and Localizable. strings files mentioned above. They are all packaged and released along with the application. However, the steps required for localization are similar for both image files and audio files. Therefore, we will focus on the localization of image files.

Resource file localization is also required to prepare several localized versions of files. Images must be localized, that is, to create localized files of several versions. For example, if we want to implement a game's control screen, There are buttons for controlling and disabling or opening background music and sound effects. They are image buttons and the text above is the text on the image, therefore, image localization is required.

650) this. length = 650; "class =" aligncenter size-full wp-image-346 "alt =" 1 "src =" http://www.bkjia.com/uploads/allimg/131228/06422Q095-0.jpg "_ xhe_src =" http://www.bkjia.com/uploads/allimg/131228/06422Q095-0.jpg "height =" 262 "width =" 381 "/>

First, the English version of the image must be added to the project. In the storyboard MainStoryboard. storyboard file, add two uiimageviews to select the corresponding image. Add Localization support for the storyboard. For more information about this process, see the previous section. Next, click the background button to select the music_background.png file, open the file display checker, and click "Make writable file" in Localization to be moved to the en. lproj directory.

650) this. length = 650; "class =" aligncenter size-full wp-image-347 "alt =" 2 "src =" http://www.bkjia.com/uploads/allimg/131228/06422W133-2.jpg "_ xhe_src =" http://www.bkjia.com/uploads/allimg/131228/06422W133-2.jpg "height =" 247 "width =" 438 "/>

The hosts file is under the zh-Hans.lproj directory.

650) this. length = 650; "class =" aligncenter size-full wp-image-348 "alt =" 3 "src =" http://www.bkjia.com/uploads/allimg/131228/06422U933-4.jpg "_ xhe_src =" http://www.bkjia.com/uploads/allimg/131228/06422U933-4.jpg "height =" 285 "width =" 418 "/>

In this way, we can run it to see the effect, but sometimes the design screen of the Story Board opened in IB often shows confusion between the Chinese version and the English version. This is due to the issue of loading the story board, in fact, there is no problem. We can re-open the project.


This article from the "Guan Dongsheng" blog, please be sure to keep this source http://2009315319.blog.51cto.com/701759/1228680

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.