Latest 0.3.8
License MIT
Platforms ios 9.0
Authors ,

CI Status


To run the example project, clone the repo, and run pod install from the Example directory first.

Supported UIElements

  • UIBarButtonItem
  • UIButton
  • UILabel
  • UINavigationItem
  • UISegmentedControl
  • UITabBarItem
  • UITableViewCell
  • UITextField
  • UITextView
  • UIView
  • UIViewController
  • UIAlertController
  • UIAlertAction


  • iOS 9.0+
  • Xcode 9.0+
  • Swift 4.0+


  • If you find any useful element missing please open an issue.
  • If you found a bug, open an issue.
  • If you want to contribute, submit a pull request.



LocalizableUI is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'LocalizableUI'


Add github "weiss19ja/LocalizableUI"to your Cartfile.

Swift Package Manager

dependencies: [
    .package(url: "", from: "0.3.1")



The easiest way to use LocalizableUI is the Storyboard. Here you can enter your Localizable.strings Keys.

For the SegmentedControl you can enter an array of Localizable.strings Keys separated by ",".

The BackButton can be set in the prior ViewController. Here you can use the ViewController fields in the Storyboard.

If you are using an NavigationItem this will override the Title and the BackButton of the ViewController.


Localization of Views

It is also possible to set the LocalizableKeys in the Code. This includes all features of the Stotyboard LocalizableKeys

let newLabel = UILabel(frame: frame)
newLabel.localizedKey = "LocalizedKey"

AlertViews must be configured in the code.

let alertController = UIAlertController(localizedTitle: Constants.titleKey, localizedMessage: Constants.messagekey, preferredStyle: .alert)
let action = UIAlertAction(localzedTitleKey: Constants.buttonKey, style: .cancel, handler: nil)
LocalizedKey to text
// #1
let localizedText = LocalizationManager.localizedStringFor("LocalizedKey")
// #2
let localizedText = LocalizationManager.localizedStringFor("LocalizedKey", bundle: bundle, value: "", comment: "")
// #3
let localizedText = "LocalizedKey".localized
Custom View

To localize any class or struct you can simply implement the Localizable Protocol

extension CustomView: Localizable {
    func updateLocalizedStrings() {
        /// do your localization stuff
        text = LocalizationManager.localizedStringFor("LocalizedKey")
Language change manual

You can change the language while the app is active. You simply have to use the LocalizationManager changeLanguage(…) method. All your Views will update without any further adjustments.

do {
    let tableName = "Localizable"
    let bundle = Bundle(for: type(of: self))
    let languageCode = "en"
    try LocalizationManager.sharedInstance.changeLanguage(to: tableName, from: bundle, languageCode: languageCode)
} catch {



Jan Weiß, Philipp Weiß


LocalizableUI is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "LocalizableUI",
    "version": "0.3.8",
    "summary": "LocalizableUI is a library to handle localization of a app directly in xcode interface builder and for supporting custom language changes.",
    "description": "This library was created to set the localized key of the UI elements directly in the interface builder of xcode. It supports all kind of UI elements for iOS and offers localized keys for all common text properties. The localization of the elements is fully handled by the library.nAnother feature of the library are custom language changes. The changes can be done by specifing another string table and the library will do all further steps for you.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Jan Weiss": "[email protected]",
        "Philipp Weiss": "[email protected]"
    "platforms": {
        "ios": "9.0"
    "source": {
        "git": "",
        "tag": "0.3.8"
    "source_files": "LocalizableUI/**/*.swift",
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This