Latest 0.0.3
Homepage https://github.com/tom-wolters/TWLocalize
License MIT
Platforms ios 9.3, requires ARC
Frameworks UIKit
Authors

Build Status
Version
License
Platform

TWLocalize written in Swift makes iOS localizations easy. No longer do you need to localize your app, keep multiple .string files and use NSLocalizedString.

Usage

The framework uses a dictionary to retrieve the desired strings. Simply add your own TWLocalizedText dictionary with all the desired translated strings.

struct MyStrings {
  static let MyText:TWLocalizedText = [.english: "This is my text", .dutch: "Dit is mijn tekst"]
}
let label = UILabel()
label.setLocalized(text: MyStrings.MyText)

or use the localized property of MyText directly.

label.text = Strings.MyText.localized

TWLocalize makes use of the current locale language. It’s possible to change the language.

TWLocalize.setLanguage(to: .dutch)

Reset the custom set language

TWLocalize.setLanguage(to: nil)

Installation

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

pod "TWLocalize"

Author

Tom Wolters, https://twitter.com/tom_wolters

License

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

Latest podspec

{
    "name": "TWLocalize",
    "version": "0.0.3",
    "summary": "Easy Localizations for iOS written in Swift",
    "description": "Easy Localizations written in Swift.nNo longer use NSLocalizedString(key:comment:) or Strings files per language.",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Tom Wolters": "[email protected]"
    },
    "homepage": "https://github.com/tom-wolters/TWLocalize",
    "social_media_url": "https://twitter.com/Tom_Wolters",
    "platforms": {
        "ios": "9.3"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/tom-wolters/TWLocalize.git",
        "tag": "0.0.3"
    },
    "source_files": "TWLocalize/**/*.{swift}",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This