Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RxSwiftCommunity/RxLocalizer
RxLocalizer allows you to localize your apps, using RxSwift ๐
https://github.com/RxSwiftCommunity/RxLocalizer
Last synced: about 2 months ago
JSON representation
RxLocalizer allows you to localize your apps, using RxSwift ๐
- Host: GitHub
- URL: https://github.com/RxSwiftCommunity/RxLocalizer
- Owner: RxSwiftCommunity
- License: mit
- Created: 2018-10-11T00:14:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-12T15:13:17.000Z (almost 3 years ago)
- Last Synced: 2024-11-06T20:19:43.628Z (2 months ago)
- Language: Swift
- Size: 3.71 MB
- Stars: 134
- Watchers: 10
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rxswift - RxLocalizer
README
[![Build Status](https://travis-ci.org/RxSwiftCommunity/RxLocalizer.svg?branch=master)](https://travis-ci.org/RxSwiftCommunity/RxLocalizer)
[![Swift](https://img.shields.io/badge/swift-5.3-orange.svg)](https://github.com/RxSwiftCommunity/RxLocalizer)
[![RxSwift](https://img.shields.io/badge/RxSwift-6.1-red.svg)](https://github.com/ReactiveX/RxSwift)
[![Platform](https://img.shields.io/badge/iOS-12+-blue.svg)](https://github.com/RxSwiftCommunity/RxLocalizer/blob/master/LICENSE)
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/RxSwiftCommunity/RxLocalizer/blob/master/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
```ruby
pod 'RxLocalizer'
```## ๐จโ๐ป Usage
### Before all:
```swift
import RxLocalizer
```### Reactive localized strings
```swift
Localizer.shared.localized("Start")
.drive(startLabel.rx.text)
.disposed(by: disposeBag)
```### Synchronously localized strings
```swift
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](https://www.ibabbleon.com/iOS-Language-Codes-ISO-639.html).
```swift
Localizer.shared.changeLanguage.accept("en")
```### Change RxLocalizer configuration
You are able to change default configuration, using `changeConfiguration` property.
```swift
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