- Home /
detecting locale on iOS
Is there any way to detect the current locale of the iOS device? It's sort of important when localizing a game. I don't see anything in the docs.
Answer by flarb · Feb 12, 2012 at 01:20 PM
How about Application.systemLanguage?
http://unity3d.com/support/documentation/ScriptReference/Application-systemLanguage.html
I think this will do the trick.
this is not the same as the locale. for instance on my system this returns "English" - what I really want is to be able to tell if I am, e.g. en-GB or en-US... lets say I want to use pound signs or dollar signs depending (as bitmaps say, not as some string)
Interested in this aswell but I feel like I'm gonna have to make conversion table...
Answer by Piotrku · Jun 30, 2016 at 10:43 PM
You might find this plugin helpful: http://u3d.as/vXf
You can differentiate between e.g. en_US and en_GB using its API
Answer by roderic · Dec 07, 2011 at 07:56 PM
[NSLocale currentLocale]
It's in the documentation: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/Reference/Reference.html#//apple_ref/occ/clm/NSLocale/currentLocale
This is the Unity Answers, so my question pertains to the Unity API. I know how to get anything from the iOS when coding in native Objective-C. This is also why I followed this question up with this one: http://answers.unity3d.com/questions/192063/compiling-plugin-for-ios-need-more-info.html
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Two letter ISO language code for mobile devices. 1 Answer
Unity Pro with free iOS and Android? 1 Answer
How do I properly initialize X509Store on iOS and Android? 0 Answers
RealTimeCubemap in both C# & JS, C# code Can't working on iOS. why ? 0 Answers