         UIPasteboard.generalPasteboard().string = text
     }
     
-    internal func translate() {
+    internal func save() {
+        let term = (textView.text as NSString).substringWithRange(textView.selectedRange)
         
+        Interface.sharedInstance.translateTerm(term) { (translation) in
+            guard let translation = translation else {
+                return
+            }
+            
+            Quizlet.sharedInstance.addTermsToSet([term: translation])
+        }
     }
     
     override func canBecomeFirstResponder() -> Bool {

            textView.becomeFirstResponder()
            
            let copyItem = UIMenuItem(title: "Copy", action: #selector(copyText))
            let translateItem = UIMenuItem(title: "Translate", action: #selector(translate))
            UIMenuController.sharedMenuController().menuItems = [copyItem, translateItem]
            UIMenuController.sharedMenuController().setTargetRect(CGRectMake(point.x, point.y, 1, 1), inView: view)
            UIMenuController.sharedMenuController().setMenuVisible(true, animated: true)

    }
    
    override func canPerformAction(action: Selector, withSender sender: AnyObject?) -> Bool {
        return action == #selector(copyText) || action == #selector(save)
    }
}
