Localization- How to deal with it in iOS8 and Xcode 6?

SHARE:



Today, with smartphone apps outreaching a large number of people residing in different corners of the world, it has become vital for the app owners/developers to ensure flawless localization of the same. Localization or Internationalization plays a significant role in improving the overall user experience. It is the localization of the app that actually decides whether the same would be accepted by a big audience or not. In other words, greater the audience, the more sales or downloads will be achieved for the app. Through this blog, I'll be throwing some light on dealing with localization in iOS8 and Xcode 6. Hope the details covered here would assist you in understanding localization in a better way.


What is the key difference between localization and internationalization?

Well, before starting off with the process of localization in iOS8 and Xcode6, it is better for all iOSApplication Development Companies to get acquainted with the key difference between localization and internationalization. While on one hand, internationalization refers to the process of designing an app for the international audience, localization refers to the mere translation of an app's user interface and resources into a variety of languages spoken across the globe. Unlike the case of localization, internationalization is something that can be performed by utilizing the in-built APIs for making modifications to the code.

And now, let's get going with the demonstration of localization in iOS8 and Xcode




Step 1- Gathering the sample data

For this post, I'll keep the source of the demo data as the International Movie Database(IMDB) which will allow us to attain the goal of displaying fine details of movies using a variety of localizations. Here, it is crucial for you to make the app dynamic and flexible in order to allow it to support additional searching capabilities and a lot of other useful features. Although there are plenty of ways for storing the movies data into the application, the one I recommend is storing the data into a .plist file. The reason for this being that it's quite convenient and less time-consuming to load data from a .plist file to an array or dictionary via the already existing iOS SDK frameworks.

Step 2- Gearing up for display the data

Prior to performing any “complex” localization tasks, it is essential for you to ensure that the app is fully functional. For this, you can start by implementing the display of the movie details in addition to the remaining visual elements available in the base language i.e. English. It is interesting to note that the data for each single movie in the .plist file is included within an array and hence the first step would be to declare an array variable to which the movie data from the file will be appended. Firstly, make sure to select the ViewController.swift file in the Project Navigator. For this, simply go to the top of the file containing all the IBOutlet properties and add the below mentioned line of code:

var moviesData : NSArray?



In addition to above, also declare the following variable:

var selectedMovieIndex : Int?

Step 3- Use the NSLocalizedString Function

Prior to proceeding ahead to the display of movies data, it is essential for you to have a look at the most crucial function called NSLocalizedString. This is basically the key for localizing text at any point of your specialized applications. Here's the list of parameters that are accepted by NSLocalizedString function:

NSLocalizedString(key:, tableName:, bundle:, value:, comment:

As per the above parameters, the main concern is just the first and the last key. While the key is a string value that's required for the app's translated versions, the comment is basically a description to the translator.

Step 4- Pay attention to Numbers and Date Formatters

Numbers and date, currency formatters play a vital role in the app localization process in iOS apps. You need to take special precautions regarding number, date and currency representation in the iOS application. Irrespective of how each number, date, currency is stored in the app, the manner in which it is being displayed must be well in accordance to the user's locale. 

Step 5- Display the data

With eight prototype cells in the table view, already added to the storyboard, you can use each one of them along with an identifier value. You can use the identifier values for dequeuing the correct cell in the tableView(tableView:, cellForRowAtIndexPath  indexPath:) method, on the basis of the current index path's row value. In addition to this, we 'll also be required to use the switch statement for specifying the details of each prototype cell.

Step 6- Localize the Storyboard

For each of the subview, Xcode will add a comment line that would comprise of the following three things: Class of the subview, the normal title(text) that was assigned to the subview in the Interface Builder and a unique object ID, that is being used internally by Xcode for the purpose of matching localized strings to the appropriate subviews. Moreover, also opt for localizing the strings, images with the final task of compiling and running the iOS application.

Conclusion

With that we're done with localizing each and every part of the application. Hope you'd have liked going through the steps and found them easy-to-follow. Thus, go ahead and start localizing your app to reach a wider group of targeted audience.


About Author: Emily Heming is a savvy writer for xicom.biz, a leading iPhone Apps Development Company from where you can find some of the highly skilled and experienced iPhone application developers for hire.



COMMENTS

Name

4G,1,Aerospace Engineering,2,AFP Consortium,1,amazon,2,Amazon india coupons,2,AMD,1,android,13,Anonymous,3,Antivirus,1,app,10,apple,23,apps,4,Assurance,1,Audi,2,auto,6,automation software,2,automotive technology,9,bitcoin,1,BlackBerry,5,blockchain,1,BMW,1,brands,1,browser,2,Business,1,cameraphone,3,car,12,car technology,8,CES,1,chromebook,3,Cloud computing,3,cloud Technology,1,companies,3,Consortium,1,content marketing,1,coupons,2,cyber crime,5,cyber security,21,data,3,data recovery,1,deals,1,Dell Streak,1,devices,2,digital currency,1,digital marketing,5,e commerce,1,eBay,1,ebook,1,ecommerce,3,Electric Cars,9,electronics sale,2,elon musk,2,email,1,energy,1,entrepreneur,1,entrepreneurship,2,facebook,24,firefox,2,firefox os,2,Flipkart,1,future technology,19,gadget,31,gamail,1,games,6,google,18,google cars,1,google glass,3,Google I/O,1,Google+,8,goole ranking,1,Graphics Card,1,hackers,14,hacking,7,hardware,3,Hosting,3,How To Guides,9,How Tos,6,icloud,2,Information Technology,11,infosec,9,innovation,34,internet,7,Internet Explorer,1,ios,5,ipad,8,iPhone,9,iWatch,1,Jabong,1,laptop,3,LinkedIn,2,Lotus Notes,3,MacBook,3,mackbook air,2,Mark Zuckerberg,4,Mercedes,1,messenger,1,microsoft,4,mobile app development,6,mobile apps,11,mobile broadband,1,mobile enterprise,8,mobile recharge,2,mobility,10,mobility management,5,Motorola Xoom,1,Myntra,1,network,3,nokia,1,NSA,2,Nvidia,1,Objective-C,1,online recharge,1,online shopping,2,opreating system,4,Outlook,2,P2P,1,page ranking,1,patent,1,Payment,1,PayTM,1,pc software,1,photoshop,1,playstation,1,Porsche,1,process management,2,Procure,1,programming,1,programming language,2,Quality,1,Redbus,1,remote control,1,renewable energy,2,review,8,samsung,5,search engine,1,security,10,Self Driving Cars,10,SEO,2,smartphone,10,sms,1,Snapdeal,1,social media,5,social network,9,software,10,startup,2,steve jobs,3,Supercars,1,Swift,1,tablet,9,team management,1,tech,4,tech conference,1,Tech event,2,Ted talk,1,Tesla,2,Tesla Motors,3,timeline,1,toolbar,1,tools,2,torrent,1,touchscreen,2,tutorial,2,twitter,3,ultrabook,1,USB,1,video,1,video editor,1,Virtual Reality,1,Volvo,2,VPN,3,Wearable gadget,2,Wearable Tech,2,Web 4.0,1,web technology,2,Wi-Fi,1,wikileaks,2,windows,5,Windows 8,7,Windows 8 Preview,1,X Mountain Lion,2,xcode,1,
ltr
item
TechFond - Latest Technology News & Analysis | Innovation | Startups | Reviews: Localization- How to deal with it in iOS8 and Xcode 6?
Localization- How to deal with it in iOS8 and Xcode 6?
https://3.bp.blogspot.com/-VafpTDs97lk/VGWtjIbdE5I/AAAAAAAACKI/iNGKuEW5aI8/s1600/ios_localization.png
https://3.bp.blogspot.com/-VafpTDs97lk/VGWtjIbdE5I/AAAAAAAACKI/iNGKuEW5aI8/s72-c/ios_localization.png
TechFond - Latest Technology News & Analysis | Innovation | Startups | Reviews
http://www.techfond.in/2014/11/localization-how-to-deal-with-it-in.html
http://www.techfond.in/
http://www.techfond.in/
http://www.techfond.in/2014/11/localization-how-to-deal-with-it-in.html
true
6925568668654321940
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy