[Mono-bugs] [Bug 664573] MonoDroid doesn't use the appropriate current culture
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Mar 30 15:51:40 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=664573
https://bugzilla.novell.com/show_bug.cgi?id=664573#c2
Jonathan Pryor <jpryor at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
AssignedTo|mkestner at novell.com |jpryor at novell.com
--- Comment #2 from Jonathan Pryor <jpryor at novell.com> 2011-03-30 19:51:39 UTC ---
The problem is that the locale is only read at process creation, and doesn't
respond to changes after the process has started.
To reproduce:
Build a project as described in the original comment, with one addition:
Java.Util.Locale locale = Java.Util.Locale.Default;
Log.Info ("*jonp*", "Java Culture={0}-{1}", locale.Language,
locale.Country);
Launch it, and note the output (originally started in Deutsch):
I/*jonp* (19259): Default Locale: de-DE
I/*jonp* (19259): bigNum=123.456.789,12
I/*jonp* (19259): Now=30.03.2011
I/*jonp* (19259): Java Culture=de-DE
Press the Back button, tap Home -> Settings -> Language & keyboard -> Select
language -> English (US), and relaunch the app, and the locale is "wrong":
I/*jonp* (19259): Default Locale: de-DE
I/*jonp* (19259): bigNum=123.456.789,12
I/*jonp* (19259): Now=30.03.2011
I/*jonp* (19259): Java Culture=en-US
Even though the user has changed the locale to en-US, the app is still acting
as if it were de-DE.
I'm not sure if this is readily solvable; the locale is first looked up (and
cached) in mono/metadata/locales.c!get_posix_locale(), which sets a `static`
`posix_locale` variable. There is no functionality to change the `posix_locale`
value. Even if there were, I'm not sure if it would work (this would require
testing).
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list