Localize Your Apps to Support Multiple Languages - iOS Localize Tutorial.

Localization is the process of translating your app into multiple language. In this tutorial, we localize apps into Hindi and Spanish. There are no more coding for localization of the app. Only follow the steps and localize your app.

This tutorial for localize text and images according to language.




Step 1 : 

On Xcode, Create a new project with name of : Localization-Demo.
                         

Step 2 : 

Select project from Project navigation and click on + button and adding multiple language which you want to localize. follow the below image. 

This tutorial only localize Hindi and Spanish language, So I added only two language.



Step 3 : 

 The default checkmark on main storyboard, click on finish button.



Step 4 : 

 You can see the main storyBoard there are created Hindi and Spanish file is created. Also adding labels and imageView in storyboard according to display below image.



Note : There are blank on Hindi and Spanish file. 

Step 5 :  Text Localization

Select label which you want to localize , Here I am Select label of "KIRIT" . Get the Object ID of this label. See the below image.

Object ID : PbD-1y-MJC



Step 6 : 


You copy the object ID from there and save it. Now you have to open the Hindi and Spanish file. 

Main.String(Hindi) file, You have to set the value of the label as below with object ID.

  /* Class = "UILabel"; text = "Kirit"; ObjectID = "PbD-1y-MJC"; */  "PbD-1y-MJC.text" = "िऴरीट";  

Main.String(Spanish) file, You have to set the value of the label as below with object ID.
  /* Class = "UILabel"; text = "Kirit"; ObjectID = "PbD-1y-MJC"; */  "PbD-1y-MJC.text" = Ciro";  

Note : Object ID is same, but its value is different according to language. so change the value only.

Note : I am use the google translate to get the value.

Follow for the same label according to above.


Step 7 : Image Localization

Now adding the image in the main storyBoard. There aren't any coding for image localization. Image localization is very simple. follow the steps.

You are already added image in your project navigation. Select the image and localize as below.
Step 8 : 

There is open one dialog box to selection of localization language. Here we selected only base. 



You can select the same image for multiple language. So you have to selected all the language of localization.


Step 9 : 

You can change images according to localization of language. So go to image  location and replace image.

In this example, Country.png(Hindi) image is replaced by indian flag.






Note : User can also localize individual image adding without the replacing as above. 


Step 10 :  How to Run localization with different language.


1. For simulator run. Go to Edit Scheme.. 




2. Select the Application Language.




Step 11 : OUTPUT 




Download 

Download the demo code from GIT , its working on all xcode : Download Here.[1]

Thanks

References

  1. ^ Download Here. (github.com)
Source: iosdevcenters.blogspot.com


Related Posts To Localize Your Apps to Support Multiple Languages - iOS Localize Tutorial.


Localize Your Apps to Support Multiple Languages - iOS Localize Tutorial. Rating: 4.5 Posted by: oliv7081

Search Here

Popular Posts

Total Pageviews

Recent Posts