How i can get user localization?

Hello!

How i can get user localization? If it is English I need to get “en”, if it is Russian I need to get “ru”

What kind of method I need to use? And how it will be work if user localization is not include in my list?

Using IOS

Thanks!

Android and iOS handle things differently.

I use the following snippet to get the user’s language setting:

local systemLang if (system.getInfo("platformName") == "Android") then systemLang = system.getPreference("locale", "language") else systemLang = system.getPreference("ui", "language") end

Android and iOS handle things differently.

I use the following snippet to get the user’s language setting:

local systemLang if (system.getInfo("platformName") == "Android") then systemLang = system.getPreference("locale", "language") else systemLang = system.getPreference("ui", "language") end