Language Persistence

Localization Preferences

If you would like to persist language across the game runs, use LocalizationPrefs component. Attach the component to any game object you want. LocalizationPrefs uses the PlayerPrefsarrow-up-right to keep application language on the device storage. So you can set PlayerPrefsarrow-up-right key from Pref Key field from inspector.

LocalizationPrefs

When the user selects a language from e.g. drop-down, LocalizationPrefs detects the language change and saves the selected language to the PlayerPrefsarrow-up-right with key you chosen. Whenever application starts, LocalizationPrefs restores the selected language and sets the application language.You should place LocalizationPrefs game object into the initial scene of your game.

Last updated