DecimalI18NBehavior

Inspired by Ricardo Grana’s i18n-datetime-behavior, i created a similar extension that converts Decimals from DB format into locale specific format.

You can find the extension and docs here:

http://www.yiiframew…ali18nbehavior/

Please note though, that this extension has some drawbacks. One being, that you have to supply validation rules in locale specific format (which makes it hard to e.g. validate ranges). But on the other hand you’d have to do this anyway…

Note: I have some ideas for an alternative approach, but that would require something like this ;)

The file seems to be corrupted. Could you upload it again please, it looks like a very useful extension.

Really? I just verified: I could download and extract the file just fine. Can you try again please?

Sorry, but i get an error in linux:

tar: This does not look like a tar archive

tar: Skipping to next header

tar: Exiting with failure status due to previous errors

And on Windows rar just says it is corrupted.

What command did you use to untar? Are you sure you supplied the "z" option?


tar xvzf decimali18nbehavior-1.0.0.tgz

Yes, I tried it but it doesn’t work, I don’t know why. Sorry for spamming your thread.

Strange. I’ve uploaded a ZIP version now. I hope this works now for you.

Yes, this works like a charm. Thank you!

problems … and do not work for me is taking me forever ParseExpression as the separator "," (comma) and I need a "." (point) … help me!!

Can you post your configuration? What is your parseExpression?

I use this extention with Yii 1.1.13 and it works perfect! Thanks!

But I think that we should override beforeValidate instead beforeSave because standart number validation interupt saving.