title: Swift: How to change the language inside of the app?
body: <p>I have an app with localized string files.
  <a href="https://i.stack.imgur.com/dl3WX.png" rel="nofollow noreferrer">Here are what my localized string files look like</a>.
  I also have a tableView with cells containing accessoryType (check marks). I want to let the user change the language of my app when changing the check in the tableView.
  Here are the codes I have in the tableView of the settings of the app:</p>
  
  <pre><code>override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      self.setValues(value: languageArray[indexPath.row]) // Upload new language settings to the server
  
      // Here I want to set the language of my app to the selected value: languageArray[indexPath.row]
      // For example, languageArray[indexPath.row] is "en"
  
      var array = tableView.visibleCells
  
      for i in 0 ..&lt; array.count {
          let cells: UITableViewCell = array[i]
          cells.accessoryType = .none
      }
  
      let cell:UITableViewCell! = tableView.cellForRow(at: indexPath)
  
      cell.accessoryType = .checkmark
  }
  </code></pre>
  
  <p>Thanks!</p>