So, when you are on assistant editor, click on the first label and Ctrl+Drag to the ViewController.swift file on the right side to connect the outlet to the label. From the article: Method swizzling is the process of changing the implementation of an existing selector at runtime.

We also add a computed value string , that localizes the selected key. We already know how to localize static text in our apps. The assistant editor helps us interact with our storyboard and the ViewController.swift file at the same time. Localizing an app – i.e. In case you’re not familiar with swizzling, you should read Method swizzling in iOS swift. Paul Hudson @twostraws May 28th 2019.
But what about the dynamic text, where we need to inject some data like names or some numeric values. View the code on Gist . Simply speaking, we can change the functionality of a method at runtime. Swift version: 5.2.
To learn how to create translation files, take a look at the “Internationalization and Localization” guide provided by Apple. To improve the localization system we will create a Localization enum, with cases for all possible keys.

How to localize your iOS app. There are two steps to creating a localized app. String interpolation. I can toggle the making it display its user interface in other languages – is surprisingly painless in iOS, and really the only hard part is making sure you get all your text translated by native speakers of your target languages. I have a project that needs to have a toggle localization languages feature so users can change the language on runtime (application running) but I don't know how to implement it.