PDA

View Full Version : [CLOSED] Ext.util.Format.brMoney



supera
Jan 27, 2012, 11:21 AM
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!

Daniil
Jan 27, 2012, 1:45 PM
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>

supera
Jan 27, 2012, 6:09 PM
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.