Skip to content

lvsti/Ilion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ilion

Carthage compatible

Ilion is (going to be) a localization helper tool for macOS that cuts the lengthy translate-build-verify loop by allowing for run-time localization adjustments.

screenshot

About the name

Ilion stands for i(nstant)-localization (l10n), but the name also makes reference to the ancient city of Troy, which the Greeks infiltrated by means of the famous Trojan Horse trick.

What is it good for?

Ilion's purpose is to allow for near-live app localization on macOS. This means that localized string overrides can be added, removed, or changed run-time, without having to rebuild the project. In some cases, the app should be relaunched in order to see the changes, but sometimes not even that is necessary. Translators who have been suffering from lack of context can now have something real to play with. Checking whether the resizing behavior is properly configured for a text UI element or iterating on a translation until it fits-- all these can now be done with almost instant feedback using Ilion.

How does it work?

Ilion needs to be built into the target application. When the app is launched, the framework intercepts calls to NSLocalizedString and proxies them to a string database built from the .strings resources and the previously set overrides. This database can then be accessed and modified via the Ilion UI.

Installation

  1. With Carthage (recommended): add the following line to your Cartfile:

    github "lvsti/Ilion"
    

    Or check out the repo and build the framework yourself if you will.

  2. Add the built Ilion.framework to your app target

  3. Make sure to include the framework in a Copy Files build phase with Frameworks set as destination

That's it! Ilion will take care of the rest when your app is launched (namely, it will inject a menu item into the application menu if it finds one). If you want to prevent Ilion from tampering with the menu, you can set the boolean IlionSuppressMenu flag to YES in your app's Info.plist.

Alternatively, you may as well invoke the Ilion UI manually as follows:

import Ilion
...
func launchIlion() {
    Ilion.shared.start()
}

or in ObjC:

#import <Ilion/Ilion-Swift.h>
...
- (void)launchIlion {
    [[Ilion shared] start];
}

Requirements

macOS 10.10

Usage

For a detailed description of Ilion's features, see the Getting Started guide.

Limitations

  • only .strings/.stringsdict files and UI base localization are supported (that is, one XIB + many strings files)
  • changes are only preserved on the machine they have been made on
  • changes cannot be committed back into the app bundle

Planned improvements

  • instant update of changed views
  • integration with cloud-based translation services

License

MIT License

About

Localization helper tool for macOS

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published