We need a way to determine the OS locale
Issue #4
resolved
PixTudio needs a way to determine the OS locale.
- In Linux/*nix we can probably just read the LANG environment variable family (but we probably have to remove anything from the "." on (en_US.UTF-8 -> en_US))
- In Windows, we can use GetLocaleInfo, but that's probably in a form that's not consistent with Linux... https://msdn.microsoft.com/en-us/library/windows/desktop/dd318101%28v=vs.85%29.aspx
- In Android, we should use JNI to determine the locale https://developer.android.com/reference/java/util/Locale.html
- In OS X (& iOS?) we can probably call [[NSLocale currentLocale] localeIdentifier] from OBJ-C (I'm guessing I should not use *nix env vars here...)
Comments (4)
-
reporter -
reporter In absence of a better location, this might go in mod_wm (mod_sys can be another option).
-
reporter By commit a35a59b I've implemented support for OS X/iOS, win32 and reading the LANG and LC_ALL environment variables. Android support is missing.
-
reporter - changed status to resolved
Commit e1bd6e1 adds an Android implementation, so we can close the issue.
- Log in to comment
In windows, we can specify how we want the country and lang names:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd464799%28v=vs.85%29.aspx
That should help retrieving a "linux-style" locale.