Swiftpack.co - RxSwiftCommunity/RxLocalizer as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by RxSwiftCommunity.
RxSwiftCommunity/RxLocalizer 1.7.0
RxLocalizer allows you to localize your apps, using RxSwift ๐Ÿš€
โญ๏ธ 135
๐Ÿ•“ 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/RxSwiftCommunity/RxLocalizer.git", from: "1.7.0")

Build Status Swift RxSwift Platform License

๐Ÿš€ RxLocalizer

RxLocalizer is a framework written in swift which allows you to localize your apps, using RxSwift.

๐Ÿ›  Requirements

  • Xcode 12.4
  • Swift 5+
  • iOS 12+

โš™๏ธ Installation

Swift Package Manager (requires Xcode 11)

Add package into Project settings -> Swift Packages

CocoaPods

pod 'RxLocalizer'

๐Ÿ‘จโ€๐Ÿ’ป Usage

Before all:

import RxLocalizer

Reactive localized strings

Localizer.shared.localized("Start")
.drive(startLabel.rx.text)
.disposed(by: disposeBag)

Synchronously localized strings

startLabel.text = Localizer.shared.localized("Start")

Change language

You are able to set language by language code. A full list of the codes you can check here.

Localizer.shared.changeLanguage.accept("en")

Change RxLocalizer configuration

You are able to change default configuration, using changeConfiguration property.

let localizerConfig = LocalizerConfig(defaults: .standard, bundle: .main, tableName: "Localizable")
Localizer.shared.changeConfiguration.accept(localizerConfig)

๐Ÿ‘ฎโ€โ™‚๏ธLicense

RxLocalizer is available under the MIT license. See the LICENSE file for more info. Copyright (c) RxSwiftCommunity

GitHub

link
Stars: 135
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

Update Swift/Xcode/Rx version
3 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