-
Notifications
You must be signed in to change notification settings - Fork 1
Locale
levching edited this page Apr 9, 2020
·
3 revisions
The AN_Locale object represents a specific geographical, political, or cultural region. An operation that requires a Locale to perform its task is called locale-sensitive and uses the Locale to tailor information for the user. The GetDefault method gets the current value of the default locale for this instance of the Java Virtual Machine.
The Java Virtual Machine sets the default locale during startup based on the host environment. It is used by many locale-sensitive methods if no locale is explicitly specified.
See the code snippet how to print locale info below:
using SA.Android.App.Utils;
...
var currentLocale = AN_Locale.GetDefault();
Debug.Log("currentLocale.CountryCode: " + currentLocale.CountryCode);
Debug.Log("currentLocale.CurrencyCode: " + currentLocale.CurrencyCode);
Debug.Log("currentLocale.LanguageCode: " + currentLocale.LanguageCode);
Debug.Log("currentLocale.CurrencySymbol: " + currentLocale.CurrencySymbol);
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Build Info
- Dark Mode
- Package Info
- Runtime Permissions
- Run External App
- Immersive Mode
- PackageManager
- Popups & Preloaders
- Rate Us Dialog
- Activity
- Intent
- Settings Page
- Media Player
- Date Picker Dialog
- Time Picker Dialog
- Locale
- Wheel Picker Dialog
- Developer Console Setup
- Connecting to The Service
- Purchase Flow
- Transactions Validation
- Subscriptions
- Licensing
- Getting Started
- Games Sing-in
- Server-side API Access
- Leaderboards
- Achievements
- Saved Games
- Image Manager
- Settings Intent