[CLOSED] Resourcemanager.Locale is case sensitive

  1. #1

    [CLOSED] Resourcemanager.Locale is case sensitive

    I realize that this come from Extjs, but is it really necessary?

    If I set Locale to be "en-gb", Resource manager goes to default "en-en". This was not evcident until I came across the the issue described below:

    In the resultant datefield produced in this code enter the date "08/09/2012" and hit TAB. Note that Locale is set to "en-gb". The date will change to "09/08/12"
    If you now explicitly set Resourcemanger Locale to "en-GB", and repeat, the date will be in the expected format: "08/09/12"

    <%@ Page Language="VB" AutoEventWireup="false" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
       <ext:ResourceManager ID="ResourceManager1" runat="server" Locale="en-gb" />
       <ext:Container runat="server">
            <Items>
                <ext:DateField ID="DateField1" runat="server" SelectOnFocus="true" Format="dd/MM/yy" >                                     
                </ext:DateField>  
                 <ext:DateField ID="DateField2" runat="server" >                                     
                </ext:DateField>                                      
            </Items>
        </ext:Container>
    </body>
    </html>
    A by-product of this is that you will get HttpException invalid webresource errors because en-gb is not recognized.
    IS there a good reason to maintain case sensitivity here?
    Last edited by Daniil; Sep 18, 2012 at 12:28 PM. Reason: [CLOSED]
  2. #2
    The problem is related with resources reading from the assembly
    .NET resource reading are case sensitive
  3. #3
    I see that now:

    The CultureInfo class specifies a unique name for each culture, based on RFC 4646 (Windows Vista and later). The name is a combination of an ISO 639 two-letter lowercase culture code associated with a language and an ISO 3166 two-letter uppercase subculture code associated with a country or region.
    from http://arvindlounge.wordpress.com/20...culture-codes/

    It would be good to have the functionality exhibited here
    Thread.CurrentThread.CurrentCulture = New CultureInfo("en-gb")
    ..where the New CultureInfo object constructor corrects the case for you.
  4. #4
    Hi Roger,

    Yes, agreed, it would be good. Thank you for the suggestion.

    Though we don't change the case because a developer can define any custom Locale with any case that he wish.

    You can achieve it with your local Ext.NET sources applying the following change in the line #1461 of ResourceManager.cs: replace
     : this.Locale;
    with
    : new CultureInfo(this.Locale).Name;

Similar Threads

  1. [CLOSED] Need ability to search combobox items by lower case or upper case
    By wisdomchuck in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 23, 2012, 1:40 PM
  2. How can i do set TextField only lower case
    By fatihunal in forum 1.x Help
    Replies: 2
    Last Post: Feb 28, 2012, 10:55 PM
  3. [CLOSED] Data selection case sensitive on Store with row selection issue
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Oct 20, 2010, 2:30 PM
  4. How can i sort without case sensitivity
    By NishaLijo in forum 1.x Help
    Replies: 2
    Last Post: Aug 19, 2010, 10:44 AM
  5. grid sorting case sensitive?
    By [WP]joju in forum 1.x Help
    Replies: 2
    Last Post: Sep 22, 2009, 6:15 AM

Posting Permissions