Realtime Dynamic localization translation delivery system for iOS and Mac OSX in Swift. Create and update texts from localization.com without needing to recompile or redeploy. Cocapod for iOS devices (iPad, iPhone, iPod Touch and Mac)

Overview

alt text

LocalizationKit

Version License Platform

Localization kit is a powerful to localize texts and translation management tool. I am a developer and invariably I get the questions 'Can you just change this text?' or 'Can you add another language?' I have designed this framework so you can manage these translations and texts without having to recompile, resubmit and without the need to use developers. Essentially take out all of the pain.

alt text

How does it work

Localization Kit quickly and easily integrates into your app using Cocoapods. Then it connects to services from LocalizationKit.com which are free to use and manage. Then as you create items in your iOS app the text keys become available instantly in the online web UI. From there you can change the text and it is reflected within app in realtime (as you type any key).

Installation

Using Cocoapods

LocalizationKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LocalizationKit" "~>4.0.3" # Swift 4
pod "LocalizationKit" "~>3.0.12" # Swift 3.2

Using Carthage

github "willpowell8/LocalizationKit_iOS" ~> 4.0.3 // Swift 4
github "willpowell8/LocalizationKit_iOS" ~> 3.0.13 // Swift 3.2

Setup

Then go to https://www.localizationkit.com/app/ and create a new app on the left handside using your name. Then take the code generated currently in the url after #/app/...KEY HERE...

Then put the following into your app delegate:

At the top:

import LocalizationKit

and in the didFinishLaunchingWithOptions the following with your key:

Localization.start(appKey: "[[KEY]]")

Enabling Live Update

One of the most powerful features of LocalizationKit is the capability to edit the text in realtime on the device. You can start the live service in the following ways:

At Initialization

Localization.start(appKey: "bed920eb-9802-4a2c-a8c0-69194729d69d", live: true)

From within Settings Bundle

Make sure you create a settings bundle with boolean object named live_localization

Localization.start(appKey: "bed920eb-9802-4a2c-a8c0-69194729d69d", useSettings: true)

Toggle it within app

Localization.liveEnabled = true

Enabling Inline Edits

As part of the application you can enable the inline editing of the localizations using long press on fields. alt text Elements supporting Inline Edit: UILabel, UIButton

Toggle it within app

Localization.allowInlineEdit = true

Using Interface Builder

Localization kit has support for Xcode UI development. The process is as simple as:

  • install the cocoapod
  • open storyboard or xib file
  • select component eg UILabel or drag on standard component UILabel
  • open attribute selector
  • set a Localize Key
  • run app and the key will be available online

alt text

Supported Components

  • UILabel
  • UINavigatioNitem
  • String
  • UIBarItem
  • UIBarButtonItem
  • UITextField
  • UIButton
  • DateFormatter

Using from Code

There are several ways of using the localization system from code without using storyboard or interface builder. The first is from any string you can call the .localize to call the localized string for it. This does not give you the live updates of the text but provides you with the text at the moment you call it.

let localizedGreeting = "Hello".localize

This will create a localization key of String.Your String (which has dots replacing the spaces). For example 'Select Languages' would become String.Select.Languages. These texts will similarly be made available for you to localize within the web UI.

let resultText = Localization.get("Localization.Key", alternate: "default label text")

Localization Keys

Localization Keys are the unique identifiers that allow you to assign localization to the correct part within your app. You can use any string as a device identifier, however the application has some features to make live easier if you use dot separation methodology: ie. Product.Details.Label

Caching

LocalizationKit internalizes the caching of the localizations and translations that you have translated. Currently once a languages is loaded from the server it is stored locally for offline and subsequent use. It is updated everytime the app is reopened where by the local version is first loaded and then replaced by the server version.

TO DO - add a build phase script that can pull first version of the

Other Functions

Set language

Localization.setLanguage("de")

Get Available Languages

Localization.availableLanguages { (languages) in
// Languages is an array of [Language] which has properties localizedName and key
}

Reset to device language

Localization.resetToDeviceLanguage()

Show debug Strings

Localization.ifEmptyShowKey = true

Set Default Language

The default language is the language that you have built the application in and will be used for passing to the backend for showing strings and data.

Localization.defaultLanguageCode = "en"

Events

If you enable the live update process then you will be able to listen to localization events. These events are:

  • LocalizationEvent - this is when a text is updated.
Localization.localizationEvent(localizationKey: String)
  • Highlight Event - this is when a user has clicked the highlight button in the web UI.
Localization.highlightEvent(localizationKey: String)

Example Listening To An Event

NotificationCenter.default.addObserver(self, selector: #selector(localizationHighlight), name: Localization.highlightEvent(localizationKey: LocalizeKey!), object: nil)

Example Date Formatter

Date format as it is a single call it does adhere to the live updates. Note the dateFormat String must be set before the Localization Key

let d = DateFormatter()
d.dateFormat = "dd MMM yyyy"
d.LocalizeKey = "General.DateFormatter"
let dStr = d.string(from: Date())
print(dStr)

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Will Powell - LinkedIn | Blog

License

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

Issues
  • Delete key is not working

    Delete key is not working

    I click on delete but the key stay

    opened by OuSS-90 6
  • Question: Obj-C support?

    Question: Obj-C support?

    Hi @willpowell8,

    Looks AMAZING! Way to go!

    One question though: can I use this library within a Obj-C project?

    opened by oferRounds 6
  • Server side code

    Server side code

    Hi, this is a really cool work! Are you going to release the server side code too? Thanks.

    opened by MarioIannotta 5
  • Changing language after UI is loaded, won't refresh the labels in tableview

    Changing language after UI is loaded, won't refresh the labels in tableview

    Hello, i am using LocalizationKit for a personal project and i implemented my app around it. Now i want to implement some kind of instant app language changer.. so i use

    Localization.setLanguage("rm") and Localization.setLanguage("en")

    but the strings are not updated. i tried with a tableview and tabbar controller

    also, why don't you use the standard code languages? Romanian should be RO instead of RM

    Thanks

    opened by rursache 5
  • Carthage support

    Carthage support

    opened by TofPlay 4
  • LocalizationKit translation bugs

    LocalizationKit translation bugs

    The website is very buggy, i once sat and translated over 100 keys in one go, and it only saved 30 or so, and some of them were not saved fully so some translations would be saved with missing characters.

    e.g "Full amount" was once saved as "Full a", it's like it saved before i have finished entering the full translation.

    opened by steelzeh 4
  • Error in the site

    Error in the site "502 Bad Gateway"

    I'm trying to open this page and it give my an error "502 Bad Gateway" https://www.localizationkit.com/app/

    opened by cs4alhaider 3
  • Swift 4 support

    Swift 4 support

    Hi,

    socket.io-client-swift (dependency) are Swift 4 support.

    Thanks

    opened by skrew 2
  • Language.localizedName not working as expected.

    Language.localizedName not working as expected.

    I tested the attribute for English, Spanish and Portuguese. Spanish and Portuguese return language keys instead of the localized name when calling this attribute, and I believe many other languages have the same behavior. I understand some of the languages might not be localized yet, but I believe it would be better to default to the English names in these cases, instead of language codes.

    opened by Felizolinha 2
  • Unable to load translation page.

    Unable to load translation page.

    Annotation 2020-03-08 132102

    Hi. I was wondering if you could help with this. I'm seeing a blank screen when I tried to load translations page and I've attached a screenshot of the error thrown from chrome.

    opened by zackrockz 0
  • are APIs down on the website?

    are APIs down on the website?

    I can't add or remove users. I can invite users but the link sent via email does nothing.

    This is really blocking , can we have this fixed server side?

    opened by vx8 0
  • Website down

    Website down

    I added many strings on the server but now once I open the translations page, the view is blank and won't load on both safari and chrome. Does this happens also to you?

    opened by MarcoCarnevali 0
  • Uploading translations

    Uploading translations

    Hello, would it be possible to upload translations even in the simplest Excel format? This would be of great help for bigger projects. Thanks, Iordan

    opened by jhristov 0
  • Some Strings don't reach iOS

    Some Strings don't reach iOS

    Hi there, I am using LocalizationKit for quiet a while now and everything worked well but today a problem appeared. Some keys will return empty Strings.

    For example Localization.get("Admin", alternate: "Admin") returns ""

    On localizationkit.com there appears to be a bug with these keys. They appear to be empty (although not appearing in "Missing" Tab). When I type something in they keep the value for a short time and then go back to "".

    As the two keys affected by this are titles for UIBarButtonItems these buttons aren't appearing at all which makes the complete admin & editor area of my app unreachable! This app is already in use by my customer...

    opened by LucasZL 2
  • Methods renamed in Swift 4.2

    Methods renamed in Swift 4.2

    The current version 4.0.5 shows error like

    • UIKeyboardWillShow' has been renamed to 'UIResponder.keyboardWillShowNotification
    • UIKeyboardFrameEndUserInfoKey' has been renamed to 'UIResponder.keyboardFrameEndUserInfoKey'
    • UIKeyboardAnimationDurationUserInfoKey' has been renamed to 'UIResponder.keyboardAnimationDurationUserInfoKey
    • UIKeyboardAnimationCurveUserInfoKey' has been renamed to 'UIResponder.keyboardAnimationCurveUserInfoKey'
    • UIViewAnimationOptions' has been renamed to 'UIView.AnimationOptions'
    • UIViewAnimationOptions' has been renamed to 'UIView.AnimationOptions
    opened by eexe1 0
  • Lable values only load at second time

    Lable values only load at second time

    Hello,

    I have this problem where on first start I see the Labels instead of the values. I use this code in AppDelegate:

    `func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. #if DEBUG NetworkActivityLogger.shared.level = .debug NetworkActivityLogger.shared.startLogging() #endif UITabBar.appearance().tintColor = UIColor.gray Localization.start(appKey: "...") Localization.ifEmptyShowKey = true Localization.setLanguage("hun") Localization.buildLanguageCode = "hun"

        return true
    }`
    

    This works, but only the second time. Also, loading into UILabels dont work at all, I had to populate them manually

    opened by breakline87 5
  • After add new language, please set the value to default string

    After add new language, please set the value to default string

    After add new language, Now the value is empty , So app show nothing or just show key.

    I think if value is empty, App should show the defallt value (English) or not key or empty.

    BTW: LocalizationKit_iOS is SO COOL! Thank you.

    opened by zxl777 5
  • Android version of LocalizationKit

    Android version of LocalizationKit

    Hi,

    I would like to know if you will port this library to Android in the future, Because It would be very useful to have a single service for localizing apps for iOS and Android.

    Please let me know, Thank you

    opened by neokree 5
  • Upload strings and more security?

    Upload strings and more security?

    Could we get the option to upload .strings og .xliff files? .strings would be fine for at start. It's a bit hard to hand some api key to your translator and ask him to translate through that. Would also be nice to have an option to download the translated file.

    Also if you have the api key you can fuck up the whole translation. Would be nice to be able to secure it with some password.

    It takes 10 seconds on charles to find the api key, when the framework does the /languages call. After that it's possible to change the translation without any other security.

    opened by steelzeh 3
Owner
Will Powell
I work in technology innovation working with the latest technologies including VR, AR, mobile (iOS and Android)
Will Powell
Swift friendly localization and i18n with in-app language switching

Localize-Swift Localize-Swift is a simple framework that improves i18n and localization in Swift iOS apps - providing cleaner syntax and in-app langua

Roy Marmelstein 2.7k Nov 18, 2021
transai is a localization tool on Android and iOS.

transai transai is a command line tool to help you do Android and iOS translation management. You can extract string files to csv format, or generate

Jintin 56 Jun 27, 2021
Localization of the application with ability to change language "on the fly" and support for plural form in any language.

L10n-swift is a simple framework that improves localization in swift app, providing cleaner syntax and in-app language switching. Overview ?? Features

Adrian Bobrowski 221 Nov 17, 2021
A CLI tool for localization resource management on Xcode. Built with Google Translator.

Supported by Jetbrains Open Source License Program Automatically translate and synchronize '.strings' files from the defined base language The basic c

gitmerge 165 Nov 15, 2021
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

Andres Silva 267 Nov 13, 2021
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 578 Nov 23, 2021
A tool for finding missing and unused NSLocalizedStrings

nslocalizer This is a command line tool that is used for discovering missing and unused localization strings in Xcode projects. Contributing and Code

Samantha Demi 155 Aug 28, 2021
Semi-automated Text Translator for Websites and Apps

macOS/Ubuntu/Windows: attranslate is a semi-automated tool for "synchronizing" translation-files. attranslate is optimized for fast and smooth rollout

Felix Kirchengast 228 Oct 30, 2021
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 547 Nov 8, 2021
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 108 Oct 20, 2021
Crowdin iOS SDK delivers all new translations from Crowdin project to the application immediately

Crowdin iOS SDK Crowdin iOS SDK delivers all new translations from Crowdin project to the application immediately. So there is no need to update this

Crowdin 47 Nov 11, 2021
CodeBucket is the best way to browse and maintain your Bitbucket repositories on any iPhone, iPod Touch, and iPad device!

CodeBucket Description CodeBucket is the best way to browse and maintain your Bitbucket repositories on any iPhone, iPod Touch, and iPad device! Keep

Dillon Buchanan 194 Aug 6, 2021
iPhone and iPod Touch version of Skeleton Key: is an addictive and unique puzzle game in which you shift keys around the board unlocking treasure chests. Made with cocos2d-iphone.

Skeleton Key (iOS) Skeleton Key is an addictive and unique puzzle game in which you shift keys around the board unlocking treasure chests. It's availa

null 116 Nov 21, 2020
PeekView supports peek, pop and preview actions for iOS devices without 3D Touch capibility

PeekView When implementing peek, pop and preview actions with 3D Touch, you may want to support such features for users accessing your app from older

Huong Do 123 Jun 19, 2021
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.1k Nov 19, 2021
A "time ago", "time since", "relative date", or "fuzzy date" category for NSDate and iOS, Objective-C, Cocoa Touch, iPhone, iPad

Migration 2014.04.12 NSDate+TimeAgo has merged with DateTools. DateTools is the parent project and Matthew York is the project head. This project is n

Kevin Lawler 1.8k Nov 8, 2021
View iOS app reviews in multiple selected territories with translation option.

App Love Note: Swift Version 2.2 currently, will update to Swift 3/XCode 8 after cocoapods are updated to Swift 3. Features View iOS Customer App Revi

Woodie Dovich 47 Sep 14, 2021
A fast and extensible gapless AudioPlayer/AudioStreamer for OSX and iOS (iPhone, iPad)

StreamingKit StreamingKit (formally Audjustable) is an audio playback and streaming library for iOS and Mac OSX. StreamingKit uses CoreAudio to decomp

Thong Nguyen 2.3k Nov 16, 2021
JustPeek is an iOS Library that adds support for Force Touch-like Peek and Pop interactions on devices that do not natively support this kind of interaction.

JustPeek Warning: This library is not supported anymore by Just Eat. JustPeek is an iOS Library that adds support for Force Touch-like Peek and Pop in

Just Eat 68 Apr 4, 2021
RubyMotion 6.9 0.0 L5 Ruby is a revolutionary toolchain that lets you quickly develop and test native iOS and OS X applications for iPhone, iPad and Mac, all using the Ruby language.

[!] This project has been moved here: github.com/amirrajan/rubymotion-applied. Report bugs and contribute to the projects specified in the README.md w

HipByte 671 Aug 20, 2021
Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit.

BioViewer Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit. Feature wish list Open PDB, CIF and FASTA files.

Raúl Montón 6 Nov 15, 2021
CI2Go is a @CircleCI client for iPhone, iPad, Apple Watch and Mac.

CI2Go the CircleCI Client CI2Go is a CircleCI client for iPhone, iPad, Apple Watch and Mac. https://ci2go.app Author Atushi Nagase License Copyright ©

Atsushi NAGASE 84 Oct 29, 2021
:syringe: Vaccine - Make your apps immune to recompile-disease

Vaccine Description Vaccine is a framework that aims to make your apps immune to recompile-disease. Vaccine provides a straightforward way to make you

Christoffer Winterkvist 296 Nov 13, 2021
:syringe: Vaccine - Make your apps immune to recompile-disease

Vaccine Description Vaccine is a framework that aims to make your apps immune to recompile-disease. Vaccine provides a straightforward way to make you

Christoffer Winterkvist 296 Nov 13, 2021
Preview extractor for news, articles and full-texts in Swift

ReadabilityKit Preview extractor for news, articles and full-texts in Swift We are a development agency building phenomenal apps. Features Extracts: T

Exyte 765 Nov 15, 2021
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.

ImageDetect ImageDetect is a library developed on Swift. With ImageDetect you can easily detect and crop faces, texts or barcodes in your image with i

Arthur Sahakyan 292 Aug 22, 2021
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.

Link Previewer for iOS, macOS, watchOS and tvOS It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.

Leonardo Cardoso 1.3k Nov 15, 2021
Retrieving InfoPlist without Jailbreaking on iOS Devices

⚠️ WARNING This project is no longer under maintenance. Since iOS 11 has removed some sensitive APIs, this project isn't working on it anymore. Goodby

Ying Zhong 1000 Nov 12, 2021
Easily communicate between iOS/OSX devices using BLE

BluetoothKit Easily communicate between iOS devices using BLE. Background Apple mostly did a great job with the CoreBluetooth API, but because it enca

Rasmus Høhndorf Hummelmose 2k Nov 14, 2021