RuntimeLocalizable helps to switch your app's localization in runtime (using existing localization strings).
- iOS 8.0+
- Xcode 8.0+
- Swift 3.0+
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate RuntimeLocalizable into your Xcode project using Carthage, specify it in your Cartfile
:
github "MobileToolkit/RuntimeLocalizable" ~> 1.0
Run carthage update
to build the framework and drag the built RuntimeLocalizable.framework
into your Xcode project.
If you prefer not to use either of the aforementioned dependency managers, you can integrate RuntimeLocalizable into your project manually.
import RuntimeLocalizable
Bundle.setLanguage("pl")
// now you can print it as usual
let someText = NSLocalizedString("Some example text...", comment: "")
import RuntimeLocalizable
Bundle.resetLanguage()
For more example usages please check the ExampleApp.
RuntimeLocalizable is released under the MIT license. See LICENSE for details.