Skip to content

Instantly share code, notes, and snippets.

import UIKit
class TrackDetailsViewController: UIViewController {
// ...
@IBOutlet weak var copyrightLabel: UILabel!
var track: Track?
phraseapp:
access_token: <your_access_token>
project_id: <your_project_id>
push:
sources:
- file: ./Views/en.lproj/Main.strings
params:
locale_id: fd935424a9ef2dfd054d982ccb7a8064
file_format: strings
- file: ./en.lproj/Localizable.strings
class TrackListViewController: UIViewController {
// ...
override func viewDidLoad() {
super.viewDidLoad()
title = NSLocalizedString("trackListTitle", comment: "")
// ...
"copyright" = "Copyright © %@ %@. All rights reserved";
"trackListTitle" = "Short Circuit";
import UIKit
class TrackDetailsViewController: UIViewController {
@IBOutlet weak var trackNameHeaderLabel: UILabel!
@IBOutlet weak var artistNameHeaderLabel: UILabel!
// ...
target 'phraseapp-demo' do
use_frameworks!
# Pods for phraseapp-demo
pod 'PhraseApp'
end
import PhraseApp
class OTATranslations {
static let shared = OTATranslations()
private init() {
#if DEBUG
PhraseApp.shared.debugMode = true
#endif
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>distributionID</key>
<string>your_distribution_id</string>
<key>devToken</key>
<string>your_distribution_development_secret</string>
<key>prodToken</key>
<string>your_distribution_production_secret</string>
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
OTATranslations.shared.updateTranslations()
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
OTATranslations.shared.updateTranslations() {