RxLocalizer is a framework written in swift which allows you to localize your apps, using RxSwift.
Add package into Project settings -> Swift Packages
pod 'RxLocalizer'
import RxLocalizer
Localizer.shared.localized("Start")
.drive(startLabel.rx.text)
.disposed(by: disposeBag)
startLabel.text = Localizer.shared.localized("Start")
You are able to set language by language code. A full list of the codes you can check here.
Localizer.shared.changeLanguage.accept("en")
You are able to change default configuration, using changeConfiguration
property.
let localizerConfig = LocalizerConfig(defaults: .standard, bundle: .main, tableName: "Localizable")
Localizer.shared.changeConfiguration.accept(localizerConfig)
RxLocalizer is available under the MIT license. See the LICENSE file for more info. Copyright (c) RxSwiftCommunity
link |
Stars: 135 |
Last commit: 2 years ago |
Updated to Swift 5.3, Xcode 12.4, RxSwift & RxCocoa to 6.1.0
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics