How to load custom content in the correct language Learn more about implementing state restoration > (And if you still support view controller state restoration, you can enable state restoration on your app delegate.) If your app supports scene-based state restoration, you can implement stateRestorationActivity(for scene) and return an NSUserActivity that encodes the scene state. If not, you’ll have to start from the app’s main screen and find that restaurant again. If that app supports state restoration, you can exit to the Settings app and return to the restaurant you were viewing - now in the new language.
By default, you use English, but might want to switch the app’s language when viewing a certain restaurant’s menu so that you can better understand its native dishes. For example, say you’re living abroad and looking for food using a restaurant delivery app. If someone decides mid-activity that they’d like to view your app in a different language, you can make the experience even smoother for them by restoring their previous state when they return.
Restore your state after a change in the language setting Once someone has set their preferred languages for an app in Settings, it will then render accordingly in your app.ĪllTrails will now render in Spanish, while the rest of the device continues to display the system language.