vojtasvoboda / oc-twigextensions-plugin

Twig extensions plugin for OctoberCMS
MIT License
18 stars 26 forks source link

The style "120000.00" does not exists (localizednumber) #4

Closed jvanremoortere closed 8 years ago

jvanremoortere commented 8 years ago

When trying to use localizednumber on a decimal field as follows...

{{ lot.price | localizednumber('decimal') }}

(tried it without defining it as decimal and with) I get the following error:

The style "120000.00" does not exist. Known styles are: "decimal", "currency", "percent", "scientific", "spellout", "ordinal", "duration"

while...

$table->decimal('price', 9, 2)->nullable();

What am I not seeing here?

vojtasvoboda commented 8 years ago

Which version of PHP do you use, please? And which version of php-intl extension? Because I try it right now with last October version, on PHP 5.6.19 and php56-intl 5.6.19 also.

Try to download October update and also try update this plugin, please.

My try:

snimek obrazovky 2016-04-21 v 10 59 27

snimek obrazovky 2016-04-21 v 10 59 39

jvanremoortere commented 8 years ago

It's on my test server (wamp64) PHP 5.6.16... But my decimal from the database returns 120000.00 Have you tried it that way?

vojtasvoboda commented 8 years ago

Same result:

snimek obrazovky 2016-04-21 v 11 30 31

snimek obrazovky 2016-04-21 v 11 30 37

Can you please check your versions with mine below?

snimek obrazovky 2016-04-21 v 11 31 41

jvanremoortere commented 8 years ago

Updated! Works now... Had 1.0.5

vojtasvoboda commented 8 years ago

Cool! I'm glad it works.