Latest 0.12.0
License Commercial
Platforms ios 8.0, requires ARC
Frameworks CFNetwork, Foundation, MobileCoreServices, Security, SystemConfiguration

Smartling Context Capturing Library

Note: this library is now deprecated. Please use the updated Smartling context capture framework with improved string matching capabilities.

Captures context from a native iOS application and uploads it to Smartling’s translation management system. Check out a demo video and see instructions below.

Translation Context for iOS

Smartling Context Kit provides the capability to capture native iOS application views for the purpose of providing context for your source content that will be shown in the Smartling Translation Interface.
Smartling analyzes uploaded views for context and matches strings in a Smartling project. When Smartling
finds a match, the captured views become the visual context that users see in the Smartling Translation
Interface. Smartling will not create any new content from the views uploaded to the context matching service,
and every unique string in Smartling can have only one context.

Getting Started

If you don’t yet have a Smartling account, sign up at

Add a Smartling Properties File to Your Project

Create file named Smartling.plist in your main project. The contents should be similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Optionally, you can omit enabled or set it to <false/> and programatically enable context capture
(described below).

Note: You can find your Project Id and API Key under Project Settings -> API in the Smartling Dashboard.


CocoaPods (Recommended)

CocoaPods is a dependency manager for Objective-C and Swift, which automates and simplifies the process of using 3rd-party libraries like SmartlingContextKit in your projects. See the CocoaPods "Getting Started" guide for more information.


pod 'SmartlingContextKit', :configurations => ['Debug']

Download Framework

  1. Download the latest release of Smartling Context Kit.
  2. Unzip the release and drag SmartlingContextKit.framework into your project’s Framework’s folder
  3. Adding the "-ObjC" Linker Flag (see a screenshot)
  4. Make sure to link against the following iOS Framworks:
    1. CFNetwork
    2. MobileCoreServices
    3. Security
    4. SystemConfiguration

If you require further assistance, please refer to Apple’s Guide to Configurating Your Application.

Contextualizing strings in a Smartling project

1) Make sure your resource files are uploaded to your Smartling project. See our help center for more detail on managing your resource files in Smartling.

2) Ensure that your ProjectID and APIKey are correctly entered in the Smartling.plist file in your main project

3) Launch your app in a test environment. Click the ‘HI’ button on any screen to capture context for that screen.

![Image of Yaktocat]

4) Smartling will search for matching strings in your Smartling project and use the snapshot you just took to show dynamic context for those strings.

Automating Context Capture

If you’re Automating UI Testing, you can capture context programatically from your UI testing script. Use the following code snippet to capture context for each view:

var appWindow = target.frontMostApp().mainWindow();
appWindow.buttons()["Smartling Capture Context"].tap();

Please keep in mind:

  1. UIAlertViews and UIActionSheets are captured automatically. Do not call .tap() after showing one of these views.
  2. Only .tap() the context capture button once per view. The button will be removed after being tapped.

Enabling or Disabling the Context Capturing Library at Runtime

As of release 0.11.0, you may enable or disable Smartling Context Capturing Library while your application is
running using notifications.

Enabling Context Capturing Library


[[NSNotificationCenter defaultCenter] postNotificationName:@"SMContextCaptureEnable" object:self];


NSNotificationCenter.defaultCenter().postNotificationName("SMContextCaptureEnable", object: self)

Disabling Context Capturing Library


[[NSNotificationCenter defaultCenter] postNotificationName:@"SMContextCaptureDisable" object:self];


NSNotificationCenter.defaultCenter().postNotificationName("SMContextCaptureDisable", object: self)


iOS Context is currently in beta. That means we need your feedback. Please send any issues or suggestions to [email protected] If context for a particular string is unsatisfactory, please send a screenshot or a dashboard link.

Latest podspec

    "name": "SmartlingContextKit",
    "version": "0.12.0",
    "deprecated_in_favor_of": "Smartling",
    "summary": "Captures context from native iOS applications into Smartling TMS",
    "license": {
        "type": "Commercial",
        "file": ""
    "authors": {
        "Scott Rossillo": "[email protected]"
    "homepage": "",
    "social_media_url": "",
    "frameworks": [
    "requires_arc": true,
    "source": {
        "git": "",
        "tag": "0.12.0"
    "source_files": "**/*.h",
    "platforms": {
        "ios": "8.0"
    "ios": {
        "preserve_paths": "ios/SmartlingContextKit.framework",
        "public_header_files": "ios/SmartlingContextKit.framework/Versions/A/Headers/*.h",
        "vendored_frameworks": "ios/SmartlingContextKit.framework"

Pin It on Pinterest

Share This