Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrealufino/Translatio
Super lightweight library that helps you to localize strings, even directly in storyboards!
https://github.com/andrealufino/Translatio
framework ios language languages localizable localization storyboard storyboards swift translation
Last synced: 4 months ago
JSON representation
Super lightweight library that helps you to localize strings, even directly in storyboards!
- Host: GitHub
- URL: https://github.com/andrealufino/Translatio
- Owner: andrealufino
- License: mit
- Archived: true
- Created: 2017-07-27T09:16:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-11T18:34:29.000Z (over 5 years ago)
- Last Synced: 2024-10-04T19:15:52.520Z (5 months ago)
- Topics: framework, ios, language, languages, localizable, localization, storyboard, storyboards, swift, translation
- Language: Swift
- Size: 1.87 MB
- Stars: 19
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-swift - Translatio - Super lightweight library that helps you to localize strings, even directly in storyboards. (Libs / Localization)
- awesome-swift - Translatio - Super lightweight library that helps you to localize strings, even directly in storyboards. (Libs / Localization)
- awesome-swift - Translatio - Super lightweight library that helps you to localize strings, even directly in storyboards! ` 📝 2 years ago ` (Localization [🔝](#readme))
- awesome-swift - Translatio - Super lightweight library that helps you to localize strings, even directly in storyboards. (Libs / Localization)
README
# Translatio
[](https://travis-ci.org/andrealufino/Translatio)
[](http://cocoapods.org/pods/Translatio)
[](http://cocoapods.org/pods/Translatio)
[](http://cocoapods.org/pods/Translatio)
![]()
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
iOS 9 or higher.
Swift 5.## Installation
Translatio is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "Translatio"
```## Usage
### Code
Translatio provides 2 additions to the String objects :
- `localized` property
- `localized(withBundle:tableName)` methodThey can both be used easily in code, this is an example :
```swift
let hello = "UI.Home.Hello".localized
let anotherHello = "UI.Home.Hello".localized(withBundle: Bundle.main, tableName: "Labels")
```### Interface Builder (storyboard and xib)
Translatio adds extensions to all the most common UI elements such as UIButton, UITextField, UITextView, UILabel, UIBarButtonItem, UINavigationItem. The extensions provide an `@IBInspectable` property that can be modified directly in the storyboard. This gives a very big advantage in localizing interface files.
![]()
As you can see the UILabel now has a Localizable Text property that can be modified directly in the IB.
## Author
Andrea Mario Lufino, [andrealufino.me](https://andrealufino.me).
## License
Translatio is available under the MIT license. See the LICENSE file for more info.