[CLOSED] Ext.util.Format.brMoney

  1. #1

    [CLOSED] Ext.util.Format.brMoney

    Hi

    In ext-lang-pt-BR.js, there are these javascript code lines:

    if (Ext.util.Format) {
            Ext.apply(Ext.util.Format, {
                thousandSeparator: ',',
                decimalSeparator: '.',
                currencySign: 'R$',  // Brazilian Real
                dateFormat: 'd/m/Y'
            });
            Ext.util.Format.brMoney = Ext.util.Format.currency;
        }
    thousandSeparator should be '.'
    decimalSeparator should be ','

    thus, in my GridPanel cells, where I format 'Ext.util.Format.brMoney', the format is going wrong value...

    This has a special reason to be so?
    How can I change this? Should I change the source code of version 2.x and I have to recompile?

    Thanks for any help!
    Last edited by Daniil; Jan 27, 2012 at 5:10 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Well, since there is no reason to doubt in your words, so, there is just a bug in the localization script.

    It would be best to report it to ExtJS team. They will believe since you are Brazilian :)

    This is how you could fix it on your page without recompiling the Ext.NET sources.

    Example
    <%@ Page Language="C#" %>
     
    <%@ 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>Ext.NET v2 Example</title>
    
        <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    
        <script type="text/javascript">
            Ext.onReady(function () {
                if (Ext.util.Format) {
                    Ext.apply(Ext.util.Format, {
                        thousandSeparator : ".",
                        decimalSeparator  : ","
                    });
                }
            });
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" Locale="pt-BR" />
        </form>
    </body>
    </html>
  3. #3
    Hi Daniil...

    the fix worked!

    Thanks a lot...

    PS:
    The ExtJS community in Brazil has several members...
    I believe they have already communicated to ExtJS Team about these settings!

    Thanks a lot, again.

Similar Threads

  1. Replies: 1
    Last Post: Nov 29, 2011, 5:11 PM
  2. [CLOSED] Error in the Ext.util.Format.date
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 16, 2011, 11:42 AM
  3. util formats for Ext.util.Format.fileSize
    By fatihunal in forum 1.x Help
    Replies: 2
    Last Post: May 21, 2011, 12:47 PM
  4. [CLOSED] Dynamic Created HtmlEditor With Ext.util.Format.htmlEncode
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 12, 2011, 12:59 PM
  5. Ext.util.Format.brMoney()
    By joao.msdn in forum 1.x Help
    Replies: 0
    Last Post: Dec 30, 2010, 12:40 PM

Posting Permissions