https://github.com/dimix/localizable
A quick & simple String extension to localize your application
https://github.com/dimix/localizable
Last synced: about 1 year ago
JSON representation
A quick & simple String extension to localize your application
- Host: GitHub
- URL: https://github.com/dimix/localizable
- Owner: dimix
- License: mit
- Created: 2017-03-15T14:07:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T14:31:45.000Z (over 9 years ago)
- Last Synced: 2025-02-15T05:27:49.839Z (over 1 year ago)
- Language: Swift
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Localizable
A quick & simple String extension to localize your application
## Features
Fast and simple extention to String to replace NSLocalizedString and similar Apple functions.
## How to Use
#### 1. Add String+Localizable.swift on your project
#### 2. Start localizing
##### Simple localization
```swift
"string.to.localize".localized
// or
"string.to.localize".localized()
```
##### Get localization form a table
```swift
"string.to.localize".localized("TableName")
```
##### Comment localization
```swift
"string.to.localize".localized(comment: "This is the comment")
```
##### Pass arguments
```swift
"string.to.localize %@".localized(arguments: [12]) // Print: "string.to.localize 12"
```
##### Pass default value
```swift
"string.to.localize %@".localized(value: "No localization found")
```
## Requirements
Current version is compatible with:
* Swift 3.0+
* iOS 9 or later