Skip to content

tuan78/LocalizationManager

Repository files navigation

LocalizationManager

Version License Platform

Lightweight localization handlers and tools for iOS:

  • Set the app language at runtime without restarting app.
  • Send notification when language and layout LTR direction changes.
  • Check layout direction and update views automatically.
  • Add Plural translation supports.

Example

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

Usage

Firstly,

import LocalizationManager

Start localization manager in AppDelegate

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

  LocalizationManager.shared.start()

  return true
}

Whenever you want to change language. Just add these codes below

// For English
LocalizationManager.shared.currentLanguage = "en"

// or for Chinese Simplified
LocalizationManager.shared.currentLanguage = "zh-Hans"

Requirements

  • iOS 9.0+
  • Swift 4.2+

Installation

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

pod 'LocalizationManager'

Author

Tuan Tran, [email protected]

License

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

About

Lightweight localization handlers and tools for iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published