text: iOS Tutorials: Localize your app with a button click | DaddyCoding
  iOS Tutorials iOS Tutorials: Localize your app with a button click
  Localization expands your app coverage to people from different part of the world. Although English is an international language, there are still some part of the countries that prefer to speak in their native country and in order to break that language barrier, we use Localization to deliver the content of the app in the native language. Today, we will be doing the basic of changing language when we click on the language we desired.
  Remember, there are many different way to do this. You could localize using Storyboard that generates the Object-ID for you. But this time, we are using Localizable.string way of localizing our app. The layout for this is really simple as we intend to only show different languages so we will only be using Label and SegmentedControl here.
  This is where you are given the option to add languages. This is a pretty CRUCIAL step I would say.
  CREATING LOCALIZATION.STRING
  For this, you will have to create a new File > Resources > String File and in my case, I'll name it Localization.string. Once you have created the file, you could Localize it by clicking on the Localize button.
  And it will show you the available Localization and once you select it, it will create a Localizable file for you.
  Since I am using English, Thai and Korean, I went to the respective files that were just created and created the key and value. The key here is "hello_world" and the value is "Hello World". We are storing the different languages in different files and we call the Korean file, it will return us the Korean language.
  // Localizable.string (English)
  "hello_world" = "Hello World";
  // Localizable.string (Thai)
  "hello_world" = "สวัสดีชาวโลก";
  // Localizable.string (Korean)
  "hello_world" = "안녕하세요 세계";
  WRITING THE CODE TO LOCALIZE YOUR APP
  We will creating this extension in the ViewController class. This is the code to read the bundle class and it will return the necessary bundle that we need.
  func localizableString(_ name: String) -> String {
  let path = Bundle.main.path(forResource: name, ofType: "lproj")
  I would assume that you have set up your own @IBOutlet. Here, we will be using an @IBAction for the SegmentedControl.
  @IBAction func changeLanguage(_ sender: UISegmentedControl) {
  label.text = "hello_world".localizableString("en")
  label.text = "hello_world".localizableString("ko")
  label.text = "hello_world".localizableString("th")
  This is the tricky part. You need to call the correct localizableString or else it wont work. To do that, go to your Project and you'll see the lproj created when you add the language in the first step.
  Once you are done, your program should work just like ours. Check out the project uploaded to GitHub.
  OVERVIEW This tutorial intents to create a slider with a value and when changing the slider, the values changes accordingly […]