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.
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.
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.
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.
-
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.
-
Add the built
Ilion.framework
to your app target -
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];
}
macOS 10.10
For a detailed description of Ilion's features, see the Getting Started guide.
- 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
- instant update of changed views
- integration with cloud-based translation services
MIT License