OneSkyHelper* helper = [OneSkyHelper sharedHelper];
helper.platformId = 868;
helper.key = @"535e19975998c52ad19470eb4805f515";
helper.defaultTableName = @"Localizable.strings";
helper.delegate = self;
helper.preferredLanguage = @"zh-Hant";
[helper setFallbackJsonNamed:@"onesky.json"];
[helper checkForUpdateOfPreferredLanguage];
-
Drag OneSky folder under the group Classes to XCode project. Check the box "copy" for prompt
-
Download JSON for Objective-C
-
Drag Classes folder under the group Classes to XCode project. Check the box "copy" for prompt
-
Insert following code to TransSample_Prefix.pch under
#import <UIKit/UIKit.h>
#import "OneSkyHelper.h"
-
Open TransSampleAppDelegate.m
-
Add following code inside
{ OneSkyHelper* helper = [OneSkyHelper sharedHelper]; helper.platformId = @1234; // the platform Id of iPhone App, found on OneSky UI helper.key = @"Your Key"; helper.defaultTableName = @"Localizable.strings"; // the file name you uploaded [helper checkForUpdate]; }
OneSkyString(@"Hello", @"Welcome message");
-
Build and install it on iphone
-
To test, exit the app, change the iPhone language, and re-launch the app. You will see the strings in the new language.