Super lightweight library that helps you to localize strings, even directly in storyboards!

Overview

Translatio

CI Status Version License Platform

Logo

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. To install it, simply add the following line to your Podfile:

pod "Translatio"

Usage

Code

Translatio provides 2 additions to the String objects :

  • localized property
  • localized(withBundle:tableName) method

They can both be used easily in code, this is an example :

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.

Logo

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.

License

Translatio is available under the MIT license. See the LICENSE file for more info.

You might also like...
Xcode plugin for quickly creating localized strings
Xcode plugin for quickly creating localized strings

Extractor Localizable Strings Extractor Localizable Strings is a open source plug-in for Xcode. It lets you extract localizable strings without openin

Lists missing keys from .strings files.

strings-check A simple command line utility to check if translation strings are missing, or if extra translations are present in a set of .strings fil

KIEM - Open Source Library, converting mistyped Korean string into English string

KIEM Open Source Library, converting misspelled Korean string into English strin

Localize is a framework writed in swift to localize your projects easier improves i18n, including storyboards and strings.
Localize is a framework writed in swift to localize your projects easier improves i18n, including storyboards and strings.

Localize Localize is a framework written in swift to help you localize and pluralize your projects. It supports both storyboards and strings. Features

Localize your views directly in Interface Builder with IBLocalizable
Localize your views directly in Interface Builder with IBLocalizable

Localize your views easily in Interface Builder with IBLocalizable. With IBLocalizable, you can localize your views in Interface Builder easily. Simpl

Diabetes: test the FreeStyle Libre glucose sensor as a Bluetooth Low Energy device, even directly from an Apple Watch.
Diabetes: test the FreeStyle Libre glucose sensor as a Bluetooth Low Energy device, even directly from an Apple Watch.

Since the FreeStyle Libre 2 / 3 glucose sensors are Bluetooth Low Energy devices, I am trying to leverage their capabilities to implement something ne

The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

JSONHelper - ✌ Convert anything into anything in one operation; JSON data into class instances, hex strings into UIColor/NSColor, y/n strings to booleans, arrays and dictionaries of these; anything you can make sense of!

JSONHelper Convert anything into anything in one operation; hex strings into UIColor/NSColor, JSON strings into class instances, y/n strings to boolea

SwiftUI Animation Library. Useful SwiftUI animations including Loading/progress, Looping, On-off, Enter, Exit, Fade, Spin and Background animations that you can directly implement in your next iOS application or project. The library also contains huge examples of spring animations such as Inertial Bounce, Shake, Twirl, Jelly, Jiggle, Rubber Band, Kitchen Sink and Wobble effects. Browse, find and download the animation that fits your needs.
Xcode Plugin helps you find missing methods in your class header, protocols, and super class, also makes fast inserting.

FastStub-Xcode Life is short, why waste it on meaningless typing? What is it? A code generating feature borrowed from Android Studio. FastStub automat

Localize iOS apps in a smarter way using JSON files. Swift framework.
Localize iOS apps in a smarter way using JSON files. Swift framework.

Swifternalization Swift library that helps in localizing apps in a different, better, simpler, more powerful way than system localization does. It use

Simple solution to localize your iOS App.
Simple solution to localize your iOS App.

Hodor is a simple solution to localize your iOS App quickly, allow you to change language of project in-app without quiting the app, Just like WeChat.

Validate iOS, Android, and Mac localizations. Find errors in .strings, .stringsdict, and strings.xml files.

Locheck An Xcode and Android localization file validator. Make sure your .strings, .stringsdict, and strings.xml files do not have any errors! What do

The Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.
The Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.

The Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data. I have put together

A very simple library to discover and retrieve data from nearby devices (even if the peer app works at background).
A very simple library to discover and retrieve data from nearby devices (even if the peer app works at background).

Discovery: A simple library to discover and retrieve data from nearby devices. Discovery is a very simple but useful library for discovering nearby de

Small library to easily run your tests directly within a Playground
Small library to easily run your tests directly within a Playground

[] (https://developer.apple.com/swift/) Build Status Branch Status master develop About PlaygroundTDD enables you to use TDD directly on Xcode Playgro

SwiftXLSX - A library focused creating Excel spreadsheet (XLSX) files directly on mobile devices
SwiftXLSX - A library focused creating Excel spreadsheet (XLSX) files directly on mobile devices

SwiftXLSX Excel spreadsheet (XLSX) format writer on pure SWIFT. SwiftXLSX is a l

TouchInspector - a lightweight package that helps you visualize and debug touches on iOS and iPadOS
TouchInspector - a lightweight package that helps you visualize and debug touches on iOS and iPadOS

TouchInspector is a lightweight package that helps you visualize and debug touches on iOS and iPadOS.

Comments
  • How to Change Languages

    How to Change Languages

    hi, I tried to implement your frameworks to my project! sorry I don't know how to change languages, I try to understand your example and Readme file but I can't. can you kindly guide me how to change one language to another language!

    opened by syedrazackimran 1
Owner
Andrea Mario Lufino
Senior iOS Developer 👨🏻‍💻
Andrea Mario Lufino
Localize your views directly in Interface Builder with IBLocalizable

Localize your views easily in Interface Builder with IBLocalizable. With IBLocalizable, you can localize your views in Interface Builder easily. Simpl

Chris Jimenez 461 Dec 29, 2022
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Jan 3, 2023
Localize iOS apps in a smarter way using JSON files. Swift framework.

Swifternalization Swift library that helps in localizing apps in a different, better, simpler, more powerful way than system localization does. It use

Tomasz Szulc 575 Nov 3, 2022
Simple solution to localize your iOS App.

Hodor is a simple solution to localize your iOS App quickly, allow you to change language of project in-app without quiting the app, Just like WeChat.

Aufree 545 Dec 24, 2022
Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files.

Installation • Configuration • Usage • Build Script • Donation • Migration Guides • Issues • Contributing • License BartyCrouch BartyCrouch incrementa

Flinesoft 1.3k Jan 1, 2023
Minification of localized strings

SmallStrings Reducing localized .strings file sizes by 80% How it works The library consists of two main components: A tool that converts the .strings

Emerge Tools 48 Jan 8, 2023
Localizable.strings files generator

Localizable.strings files generator When we want to internationalize our project always is a headache to maintain the Localizable.strings files. This

humdrum 30 Dec 18, 2022
Check Localizable.strings files of iOS Apps

Rubustrings Check the format and consistency of the Localizable.strings files of iOS Apps with multi-language support Rubustrings is also available fo

David Cordero 110 Nov 12, 2022
An application to convert strings to diffirent formats

Localized An application to convert strings to diffirent formats This app will help developers to convert strings from application in one platform to

null 16 Feb 12, 2021
Localizations is an OS X app that manages your Xcode project localization files (.strings)

Localizations 0.2 Localizations is an OS X app that manages your Xcode project localization files (.strings). It focuses on keeping .strings files in

Arnaud Thiercelin 129 Jul 19, 2022