[CLOSED] Urgent: Ext.Net's support for localization and internationalization

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Urgent: Ext.Net's support for localization and internationalization

    We recently introduced localization support for one of our large applications that uses Ext.Net in a major way. Introducing localization support for our application went well, and we added French as an option to application users.

    During testing, a strange exception with DateTimes was reported. After some analysis, I found that a particular operation in the application was executing well with the english language, but gave the exception in French.

    I was able to narrow down the problem with Ext.Net's DateField somewhere.
    When Freanch is set as the browser language, the DateField's DateMenu shows month names in French. But there are 2 important problems with the implementation:
    1) I selected 14 Nov, 2010 as the date, but it always automatically changes to 14 Feb 2010.
    2) Even then after submitting the date, it goes to the server as you can see in the screenshot below:

    Click image for larger version. 

Name:	Clipboard01.png 
Views:	144 
Size:	3.1 KB 
ID:	2282

    I was astonished that the value is transferred as the display text of the DateField, and not as sortable serialized representation (like it happens when sending dates from server to client for Stores).

    And still then, Ext.Net is not able to convert the value submitted on the server back to a valid date, and instead gives DateTime.MinValue as the value for the DateField.

    I have not checked elsewhere, but I suspect other widgets might also have such subtle problems.

    If it matters, our application always uses "en-US" as the current culture, only the UICultre is set to "fr" (or the user chosen language).

    To ensure that this is not causing any problem, I set both Thread.CurrentCulture and Thread.CurrentUICulture to "fr" but still the same exception.

    This is a blocking issue and has the capability to stall the entire localization feature we had introduced for our application :(
    Last edited by geoffrey.mcgill; Mar 01, 2011 at 3:38 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I cannot reproduce it.
    - I set French language in the Language preferences of IE
    - set Locale="client" in ResourceManager
    - run sample and ensure that french locale file is added
    - choose 14 Nov 2010 in DateMenu
    - click submit button

    Please provide additional instruction how we can reproduce the issue

    <%@ Page Language="C#" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <script runat="server">
        protected void SubmitClick(object sender, DirectEventArgs e)
        {
            X.Msg.Notify("Selected date", DateField1.SelectedDate.ToLongDateString()).Show();
        }
    </script>
    
    <!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 id="Head1" runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" Locale="client">           
            </ext:ResourceManager>
            
            <ext:DateField ID="DateField1" runat="server" />
            
            <ext:Button runat="server" Text="Submit">
                <DirectEvents>
                    <Click OnEvent="SubmitClick" />
                </DirectEvents>
            </ext:Button>   
            
        </form>
    </body>
    </html>
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    I did a quick test with what you mentioned and it still fails for me. I will test this again more comprehensively tomorrow, but have you people made any fixes in this regard in the last couple of months or so??

    I thik our app is using Ext.Net from September or October.
  4. #4
    Hi,

    No, as I know we did not fix anything similar.
    Try to get latest Ext.Net and test my sample to ensure that the issue reproducible (or not reproducible) with latest code
    Vladimir Shcheglov
    Sr. Developer
  5. #5
    Hi vlad, sorry I could not reply to this thread earlier. Please check the attached 2 files. Set your Browser language to anything (English, French or whatever).

    Both these files demonstrate both of the issues I have mentioned in the first message above.

    As mentioned in the first message, the issue seems to occur because the toolkit transfers the display text of DateField to the server, instead of ISO serialized or some other standard form.

    I think sending serialized sortable format or UTC timestamp to the server and then using this on the server to parse it would take care of all locales.
    Attached Files
  6. #6
    Hi,

    Thanks for the samples. it is ExtJS french locale bug.
    French month names must be started with lower case letter, also short names (abbreviations) of some month must ended with '.'
    http://ucblibraries.colorado.edu/pre...reviations.pdf
    http://wordinfo.info/unit/3237/ip:23

    I fixed french locale files (you can update those files from SVN)
    http://svn.ext.net/premium/trunk/Ext...ext-lang-fr.js
    http://svn.ext.net/premium/trunk/Ext...-lang-fr-CA.js


    About second issue, ExtJS DateField submits own value as is (doesn't convert it to any unviresal format) therefore you have to set proper Culture on the server side to correct parsing. Please note that it must be Culture, not UICulture
    <%@ Page Language="C#" Culture="fr-FR" %>
    At this moment, setting culture is required and cannot be ommited. I will discuss it with Geoffrey today (converting submitting values to standard form)
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. Replies: 0
    Last Post: Aug 06, 2012, 3:59 AM
  2. need urgent help challenging job
    By grajaneesh in forum 1.x Help
    Replies: 1
    Last Post: Apr 08, 2011, 2:31 PM
  3. [CLOSED] Message Box Localization support
    By SymSure in forum 1.x Premium Help
    Replies: 8
    Last Post: Apr 07, 2011, 8:17 PM
  4. did ext.net support combotree or when to support
    By kindy_wu in forum Feature Requests
    Replies: 1
    Last Post: Nov 23, 2010, 7:59 AM
  5. [CLOSED] Help urgent with fileupload
    By smart+ in forum 1.x Premium Help
    Replies: 9
    Last Post: Oct 05, 2010, 12:13 PM

Posting Permissions