Text Manager
Use the Apps panel iOS/Android/SDK SDK to manage your app texts in one place, with multilingual support.
The iOS Apps Panel SDK provides a Text Management module, letting you update the texts in your app without having to resubmit it to the stores. It supports multiple languages, and you can add variables to your strings.
Integration
At every launch, your app downloads the latest version of texts. That means if you want to change text in your app, you don't have to release a new version of your app.
You can specify a default language like so:
[APTextManager setDefaultTextDictionary:@"fr"];
APTextManager.setDefaultTextDictionary("fr")
At the first launch of your application, the texts won't be downloaded yet, so you need to embed a JSON file containing the keys and values in your app.
You can get this file in your back office, on the page where you set your texts. Just download the chosen language and drag and drop it in your Xcode Project. Do not change the name of the file before adding it to the Xcode Project. If your app supports multiple languages, repeat the process for every language.
Usage
NSString *title = [APTextManager stringForKey:@"title"];
let title: String = APTextManager.string(forKey: "title")
If the key you are expecting for doesn't exist on the back office, the function returns the parameter you passed. In the exemple, you'll get the value "title" in the variable title.
You can also add variables directly inside the text manager. Surround the variable with two double sharp, as following :
welcome_text : "Hello, ##USER_NAME##, how are you ?"
To inject the value, use the native stringWithFormat
method :
NSString *welcomeText = [NSString stringWithFormat:[APTextManager stringForKey:@"title"], @"Damian"];
let welcomeText: String = String(format: APTextManager.string(forKey: "welcome_text"), "Damian")
Updated about 7 years ago