dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Globalization CultureI


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Globalization CultureInfo.cs,1.11,1.12
Date: Wed, 13 Nov 2002 22:26:04 -0500

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Globalization
In directory subversions:/tmp/cvs-serv23326/runtime/System/Globalization

Modified Files:
        CultureInfo.cs 
Log Message:


Look for internal cultures using either ID or name, because different
engines may have different requirements.


Index: CultureInfo.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Globalization/CultureInfo.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** CultureInfo.cs      14 Nov 2002 03:17:10 -0000      1.11
--- CultureInfo.cs      14 Nov 2002 03:26:02 -0000      1.12
***************
*** 124,127 ****
--- 124,130 ----
        extern private static int InternalCultureID();
  
+       [MethodImpl(MethodImplOptions.InternalCall)]
+       extern private static String InternalCultureName();
+ 
        // Get the current culture object for the running thread.
        public static CultureInfo CurrentCulture
***************
*** 136,140 ****
                                                }
                                                int id = InternalCultureID();
!                                               if(id == 0 ||
                                                   
_I18NCultureHandler.GetCultureHandler(id) == null)
                                                {
--- 139,157 ----
                                                }
                                                int id = InternalCultureID();
!                                               if(id <= 0)
!                                               {
!                                                       // Try getting the name 
instead, in case this
!                                                       // engine doesn't know 
about culture ID's.
!                                                       String name = 
InternalCultureName();
!                                                       try
!                                                       {
!                                                               id = 
MapNameToID(name);
!                                                       }
!                                                       catch(ArgumentException)
!                                                       {
!                                                               id = -1;
!                                                       }
!                                               }
!                                               if(id <= 0 ||
                                                   
_I18NCultureHandler.GetCultureHandler(id) == null)
                                                {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]