iOS Localization

Table Of Contents

  • Getting Started / How to localize your iPad or iPhone Application
  • iOS Localization FAQ

Back to Developer Page

How to Localize your iPad or iPhone Application (Swift or Objective C)

Getting started is easy we have made it as simple as possible to get up and running with integration into storyboards, xib and pure code. To do this here is a tutorial guide of getting started with LocalizationKit.

1. Create project

First you need to create a new project in Xcode as you would normally.

2. Add LocalizationKit Framework

To add LocalizationKit Framework to you can either use Cocoapods with the following command:

pod "LocalizationKit"

Or you can go to our git repository and copy the library files into your project.

3. Initialize LocalizationKit in AppDelegate

You need to start the localization service, to do this you need to add the following line of text to your application’s AppDelegate under the didFinishLaunchingWithOptions function. You also need to replace the [[APP_KEY]] with your app key which you can create from the New App form on the app page here

Localization.start(appKey: "[[APP_KEY]]", live:true)

4. Localize Your UI

To do this you have a number of options available to you. The easiest is using XIB and storyboard UI where you add a standard UILabel control and then in the inspector add a localization key to expose it to the UI. Otherwise you can always drop back to using the code call to localize your texts.

let resultText = Localization.get("localization Key", alternate:"default label text")

iOS Localization FAQ

What components do you support for Interface Builder Localization?

We are currently expanding the set but currently we support UILabel and UIViewController for storyboard and XIB internationalization throught the interface builder.

How do I go about localizing strings?

You can localize strings from code line in a number of ways. The easiest is to use String.localize which works for example like “Hello”.localize