Hi everyone
I'm trying to use the number formater and I'm getting the following exception:
Property "ProductController._locale" is not defined.
how can I set this?
Page 1 of 1
Property "ProductController._locale" is not defined. How to fix thix?
#2
Posted 27 July 2009 - 01:27 PM
the constructor of numberformatter needs a locale id.
dont know, what about simply add a
or instantiate the numberformatter with 'de_DE'
?
dont know, what about simply add a
public $_locale = 'de_DE';
or instantiate the numberformatter with 'de_DE'
?
#3
Posted 27 July 2009 - 01:30 PM
mbi, on 27 July 2009 - 01:27 PM, said:
the constructor of numberformatter needs a locale id.
dont know, what about simply add a
or instantiate the numberformatter with 'de_DE'
?
dont know, what about simply add a
public $_locale = 'de_DE';
or instantiate the numberformatter with 'de_DE'
?
I figured that this is something that ought to be some sort of a global (session) setting somewhere so it doesn't have to be set manually all the time
#4
Posted 27 July 2009 - 04:46 PM
As long as you have defined source language with CApplication::sourceLanguage and default locale with CApplication::language in your application config file you should be fine.
#5
Posted 27 July 2009 - 04:51 PM
knut, on 27 July 2009 - 04:46 PM, said:
As long as you have defined source language with CApplication::sourceLanguage and default locale with CApplication::language in your application config file you should be fine.
I'm having this
'language' => 'en',
'sourceLanguage' => 'en',
in my main.php config file and I'm getting the error
#6
Posted 29 July 2009 - 04:18 PM
You should use Yii::app()->numberFomatter rather than $this->numberFormatter (assuming $this refers to your controller).
Share this topic:
Page 1 of 1

Help

This topic is locked











