How to localize your Application storyboard, files and appname?

In this simple step by step guide i will go through a simple project and show you how to localize your iOS application name and other files according to your language or region.

My work station is Mac OS X 10.12 and macOS sierra. My current Xcode version is 8.0

First we will start a project

 

IOS 10 localization example app
IOS 10 localization example app

 

Add a label in the Main.storyboard and set text as “This is Title in English

First page

 

Run the app and you will get a screen like below.

iPhone7 Simulator view

 

To add localization to your project, Select your project from top left corner and goto ‘info’  tab

Enable Localization in ios10 xcode8

 

and add localization language  (for now add french for this example)

 

add-language-or-region-to-ios-10-app

You will be prompted to generate localization files. (see below)

 

ios10-xcode8-selection-files-for-localization

Resource File :  check/uncheck if you want to create localizable file.

Reference Language : Default language.

File Types : You can create either more than one storyboards or localizable strings. (I just created string files only here)

 

Press finish button. and you’re done..! You will be generated localization files for your storyboards and string files.

You can see the changes visually. Main.storyboard file is for base language and

Now go and change the storyboard label text in the Main.strings file which is created for french localization, like below.

 

 

Xcode8-write-text-to-french-localization

 

Before you run the app, go and change the language and region setting in Simulator to french.

simulator_iphone7_change_settings_region

 

Now you run the app.!! You will get the following result.

ios7_xcode8_simulator_iphone7_french_localization

 

We have not finished yet. We want to change the Application name according to the user’s location, that is displayed under the appicon. Todo that, We need to create infoPlist.string file. (Its already created in the previous step.)

Add the Keys of the info.plist file and localizable values like below.

"CFBundleDisplayName" = "Bonjour";
"CFBundleName" = "Bonjour..";

info plist String file French

done.! You can see the name has changed once you setup your iphone7 simulator to french language and region.

iphone7-xcode8-ios10-simulator-screenshot-english

Check the App icon Name has changed now.

Xcode8 Ios10 simulator

 

Finished.!

 

 

Please write in the comment section if you feel this guide is helpful for you.  Don’t forget to give me your feedback. we will continuously update the article.

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.