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

Page 3 of 4 FirstFirst 1234 LastLast
  1. #21
    Makes sense... Will take note of that...
  2. #22
    Code samples from above.

    Example (Locale.aspx)

    <%@ Page Language="C#" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
     
    <script runat="server">
        protected void SubmitClick1(object sender, DirectEventArgs e)
        {
            X.Msg.Notify("Selected date", DateField1.SelectedDate.ToLongDateString()).Show();
        }
    
    	protected void SubmitClick2 (object sender, DirectEventArgs e)
    	{
    		X.Msg.Notify("Selected date", DateField2.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">           
            </ext:ResourceManager>
             
            <ext:DateField ID="DateField1" runat="server" Format="d MM yyyy" />
             
            <ext:Button runat="server" Text="This works fine">
                <DirectEvents>
                    <Click OnEvent="SubmitClick1" />
                </DirectEvents>
            </ext:Button>   
             
            <ext:DateField ID="DateField2" runat="server" />
             
            <ext:Button runat="server" Text="This doesn't">
                <DirectEvents>
                    <Click OnEvent="SubmitClick2" />
                </DirectEvents>
            </ext:Button>   
             
        </form>
    </body>
    </html>
    Example (Locale-Fr.aspx)

    <%@ Page Language="C#" UICulture="fr" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
     
    <script runat="server">
        protected void SubmitClick1(object sender, DirectEventArgs e)
        {
            X.Msg.Notify("Selected date", DateField1.SelectedDate.ToLongDateString()).Show();
        }
    
    	protected void SubmitClick2 (object sender, DirectEventArgs e)
    	{
    		X.Msg.Notify("Selected date", DateField2.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" Format="d MM yyyy" />
             
            <ext:Button runat="server" Text="This works fine">
                <DirectEvents>
                    <Click OnEvent="SubmitClick1" />
                </DirectEvents>
            </ext:Button>   
             
            <ext:DateField ID="DateField2" runat="server" />
             
            <ext:Button runat="server" Text="This doesn't">
                <DirectEvents>
                    <Click OnEvent="SubmitClick2" />
                </DirectEvents>
            </ext:Button>   
             
           <ext:Label runat="server" Text="Moreover notice month names are in English above, they should have been in Freanch." />
        </form>
    </body>
    </html>
    Geoffrey McGill
    Founder & CEO
  3. #23
    Hi Geoff, I upgraded to the latest version from SVN (3465) and the issue where server-side dates are DateTime.MinValue if Format on DateField has not been specified explicitly still exists.
  4. #24
    I've found one of the issues, just testing before commit.
    Geoffrey McGill
    Founder & CEO
  5. #25
    The Date parsing issue has been fixed and committed to SVN.

    Setting a neutral culture ("fr") in the UICulture property of the @Page directive is not supported. You must set to a specific Culture. This is a limitation of ASP.NET.

    Example

    // Fail
    <%@ Page Language="C#" UICulture="fr" %>
    
    // Pass
    <%@ Page Language="C#" UICulture="fr-FR" %>
    Hope this helps.
    Geoffrey McGill
    Founder & CEO
  6. #26
    You can use a neutral culture in the .Locale property of the <ext:ResourceManager>. This enables a work-around for the UICulture limitation noted above.

    Example

    <ext:ResourceManager runat="server" Locale="fr" />
    Hope this helps.
    Geoffrey McGill
    Founder & CEO
  7. #27
    Thanks for the fix.. I will update and test tomorrow..

    Quote Originally Posted by geoffrey.mcgill View Post
    Setting a neutral culture ("fr") in the UICulture property of the @Page directive is not supported. You must set to a specific Culture. This is a limitation of ASP.NET.
    I will check this, but I think I have used this with ASP.NET successfully before.

    And for our current app, we set UICulture in backend code anyways...
  8. #28
    Quote Originally Posted by geoffrey.mcgill View Post
    You can use a neutral culture in the .Locale property of the <ext:ResourceManager>. This enables a work-around for the UICulture limitation noted above.
    Thanks for the suggestion. I will test this and get back...
  9. #29
    Quote Originally Posted by r_honey View Post
    Thanks for the fix.. I will update and test tomorrow..



    I will check this, but I think I have used this with ASP.NET successfully before.

    And for our current app, we set UICulture in backend code anyways...
    It's a limitation when formatting and parsing DateTime objects and using the CurrentUICulture. Probably doesn't matter if set in @Page directive or code-behind.

    I have an idea on how to work-around, so I'll run some tests.
    Geoffrey McGill
    Founder & CEO
  10. #30
    ok, I've committed (#3467) fix/work-around for the UICulture limitation when setting a neutral culture.

    The following is possible.

    Example

    <%@ Page Language="C#" UICulture="fr" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
     
    <script runat="server">
    	protected void Button1_Click (object sender, DirectEventArgs e)
    	{
    		X.Msg.Notify("Selected date", this.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 runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />           
             
            <ext:DateField ID="DateField1" runat="server" />
             
            <ext:Button runat="server" Text="Submit" OnDirectClick="Button1_Click" />
        </form>
    </body>
    </html>
    Hope this helps.
    Geoffrey McGill
    Founder & CEO
Page 3 of 4 FirstFirst 1234 LastLast

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