Update: setting default_culture to 'en' on settings.yml actually fixes
the problem.
I'm happy that it works but I feel a bit unconfortable with the fact
that default_culture has to be set to 'en' .
How I can override culture on a test environment like I tried to do on
my previous example.
Jérôme
On 29 oct, 13:37, Jérôme TEXIER <[EMAIL PROTECTED]> wrote:
> Hum, I did also think it was linked to the locale but without any
> success...
>
> I tried to set it to 'en' (or en_US, en_GB) , which can be easily done
> on symfony using setCulture methods, like in the example below :
>
> include(dirname(__FILE__).'/../bootstrap/unit.php');
> $configuration =
> ProjectConfiguration::getApplicationConfiguration('backend', 'test',
> true);
> $context = sfContext::createInstance($configuration);
> $user = $context->getUser();
> $user->setCulture('en_US'); //equivalent to setlocale(LC_ALL,
> 'en_US.utf8');
>
> $loader = new sfPropelData();
> $loader->loadData(sfConfig::get('sf_test_dir').'/fixtures/
> Product.yml');
>
> Regards.
>
> Jérôme
>
> On 29 oct, 13:08, "Gunnar Lium" <[EMAIL PROTECTED]> wrote:
>
> > Hi!
>
> > I had a similar problem when dealinng with latitude and longitude values.
> > The problem was that according my locale, floats should be separated by
> > commas, whereas the english standard is to use a point. I think you can get
> > around this by changing the locale.
> > 2008/10/29 Jérôme TEXIER <[EMAIL PROTECTED]>
>
> > > Hi all,
>
> > > I have a problem with Propel regarding insert of float values on a
> > > mySQL database.
> > > Basicaly, the float . separator is replaced in the SQL query by a ,
> > > (comma) without quoting the value which creates an error.
>
> > > INSERT INTO product (NAME,PRICE) VALUES ('Foo',44,6)
> > > in place of :
> > > INSERT INTO product (NAME,PRICE) VALUES ('Foo','44.6')
>
> > > For example this occurs when I try to load test data from a fixture
> > > file using :
> > > $loader = new sfPropelData();
> > > $loader->loadData(sfConfig::get('sf_test_dir').'/fixtures/Data.yml');
>
> > > Product:
> > > product1:
> > > name: Foo
> > > price: 44.6
>
> > > I precise I use symfony 1.1.4 and propel 1.2.
>
> > > Any ideas ?
>
> > > Regards.
>
> > > Jérôme
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---