- 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.
To run the example project, clone the repo, and run pod install
from the Example directory first.
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"
- iOS 9.0+
- Swift 4.2+
LocalizationManager is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LocalizationManager'
Tuan Tran, [email protected]
LocalizationManager is available under the MIT license. See the LICENSE file for more info.