GetLingo Manager is a library to help developer connect to Getlingo Services to handle your apps translations.
GetLingoSampleApp.xcworkspace to see a simple demonstration of implementing the manager and fetching translations.
You need to register your app on http://getlingo.io. There you can retrieve an api key and an app id that you need in order to indentify your application.
GetLingoManager is available through CocoaPods. To install
it, simply add the following line to your
You may alternatively just copy the contents of the
GetLingoManager folder into your project.
GLLingoManager to your AppDelegate.m
Then you need to instantiate the singelton and set api key and app id. So in
didFinishLaunchingWithOptions: add the following line:
[[GLLingoManager sharedManager] setApiKey:@"YOUR-API-KEY" andAppId:@"YOUR-APP-ID"];
You can also set an optional initial prefered language code if you want to force the app to use a specific language:
[[GLLingoManager sharedManager] setApiKey:@"YOUR-API-KEY" andAppId:@"YOUR-APP-ID" andPreferedLanguage:@"en"];
To use Getlingo for your strings you have to use our macro,
GLLocalizedString takes two parameters,
GLLocalizedString(key, default), the
key is used to match translations that have been fetched from the getlingo.io API to your app's strings. The
default value is used if no matching translations are found. To set the text of a label you simply do this:
self.myLabel.text = GLLocalizedString(@"sign_in", @"Sign in");
- 0.3.0 Reworked network class to work with api changes.
- 0.2.0 Updated demo app and minor priority changes in GLLingoManager
- 0.1.0 Initial release with basic functionality
This project is licensed under the MIT License - see the LICENSE.md file for details