             case .iOS:
                 localization = "\"\(key)\" = \"\(line[i])\";"
             }
-            langs[i - 1].append(localization)
+            langs[langIndex].append(localization)
         }
     }
 }

    case Android, iOS
}

//Parse google doc
dump(Process.arguments)
let platformP = Process.arguments[1]
let platform: Platform
switch platformP {
case "android":
    platform = .Android
case "ios":
    platform = .iOS
default:
    platform = .iOS
}
let fileP = Process.arguments[2]
let path = NSURL(fileURLWithPath: fileP)
let data = NSData(contentsOfURL: path)


var langs = [[String]]()
var firstRow = splitted.removeFirst()
firstRow.removeFirst() // "PLATFORM"
firstRow.removeFirst() // "KEY"
for lang in firstRow {
    langs.append([String]())
}

//Split by language
for line in splitted {
    let forPlatform = parsePlatformName(line[0])
    let key = line[1]
    for i in 2..<line.count {
        let langIndex = i - 2
        if key.hasPrefix("//") {
            langs[langIndex].append(key)
        } else if line[i] != "" && (forPlatform == nil || forPlatform! == platform) {
            let localization: String
            switch platform {
            case .Android:
