mikl
(Mike)
May 24, 2011, 7:34am
1
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
Kapnt
(Jost Novljan)
November 22, 2011, 10:22pm
2
The file seems to be corrupted. Could you upload it again please, it looks like a very useful extension.
mikl
(Mike)
November 23, 2011, 7:47am
3
Really? I just verified: I could download and extract the file just fine. Can you try again please?
Kapnt
(Jost Novljan)
December 4, 2011, 8:27pm
4
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.
mikl
(Mike)
December 5, 2011, 7:56am
5
What command did you use to untar? Are you sure you supplied the "z " option?
tar xvzf decimali18nbehavior-1.0.0.tgz
Kapnt
(Jost Novljan)
December 5, 2011, 10:53am
6
Yes, I tried it but it doesn’t work, I don’t know why. Sorry for spamming your thread.
mikl
(Mike)
December 5, 2011, 11:01am
7
Strange. I’ve uploaded a ZIP version now. I hope this works now for you.
Kapnt
(Jost Novljan)
December 5, 2011, 4:29pm
8
Yes, this works like a charm. Thank you!
juan1753
(Juancho1753)
July 3, 2012, 7:23pm
9
problems … and do not work for me is taking me forever ParseExpression as the separator "," (comma) and I need a "." (point) … help me!!
mikl
(Mike)
July 9, 2012, 6:13am
10
Can you post your configuration? What is your parseExpression?
dlnsk
(Dlnsk)
April 7, 2014, 2:58am
11
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.