[Mono-bugs] [Bug 664573] New: MonoDroid doesn't use the appropriate current culture

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 14 10:23:52 EST 2011



           Summary: MonoDroid doesn't use the appropriate current culture
    Classification: Mono
           Product: MonoDroid
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mkestner at novell.com
        ReportedBy: jpryor at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

MonoDroid doesn't use the appropriate current culture.

To reproduce, create a new Activity with this as the Activity.OnCreate() body:

    Log.Info ("*jonp*", "Default Locale: {0}",
    double bigNum = 123456789.123;
    Log.Info ("*jonp*", "bigNum={0}", string.Format ("{0:N}", bigNum));
    Log.Info ("*jonp*", "Now={0}", DateTime.Now.ToShortDateString ());

Go to Android settings and change the default language to e.g. Deutsch
(german).  Run the app, and run 'adb logcat' to see the above diagnostic

Actual Output:

    I/*jonp*  ( 5305): Default Locale: 
    I/*jonp*  ( 5305): bigNum=123,456,789.12
    I/*jonp*  ( 5305): Now=01/14/2011

Expected output:

    I/*jonp*  ( 5305): Default Locale: de-DE
    I/*jonp*  ( 5305): bigNum=123.456.789,12
    I/*jonp*  ( 5305): Now=14.01.2011

The problem is that mono uses the LC_ALL or LANG environment variables to
determine what the current culture is, and Android doesn't set either of those
environment variables.

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