Welcome Guest, Not a member yet? Register   Sign In
Date formats and Languages
#1

[eluser]duartix[/eluser]
Cheers.

I'm using the date() function to build up a date string and I was expecting to find "Setembro 23(...)" in that string, but I'm getting "September 23(...)" instead.

My config.php file has a line there (put by me) like this:
Code:
$config['language'] = 'portuguese-pt';

Under system\language\ I have two folders:
\english (the one that came with php)
\portuguese-pt (one I found around that exactly the same lang files (including calendar_lang.php) with all the strings in all files translated to Portuguese)

In my config.php I have also defined a constant:
Code:
define( 'DATE_FORMAT', "F j, Y, g:i a" );

So when I do
Code:
$this->session->set_userdata('logonTime', date(DATE_FORMAT));
do you have any idea why the date isn't being translated to Portuguese?

I tried debugging date() to see what was going on inside, but I guess it's a built-in because I couldn't get inside it.

Thanks in advance.
#2

[eluser]duartix[/eluser]
Anyone?
#3

[eluser]Zack K.[/eluser]
[quote author="duartix" date="1379936054"]Cheers.

I'm using the date() function to build up a date string and I was expecting to find "Setembro 23(...)" in that string, but I'm getting "September 23(...)" instead.

My config.php file has a line there (put by me) like this:
Code:
$config['language'] = 'portuguese-pt';

Under system\language\ I have two folders:
\english (the one that came with php)
\portuguese-pt (one I found around that exactly the same lang files (including calendar_lang.php) with all the strings in all files translated to Portuguese)

In my config.php I have also defined a constant:
Code:
define( 'DATE_FORMAT', "F j, Y, g:i a" );

So when I do
Code:
$this->session->set_userdata('logonTime', date(DATE_FORMAT));
do you have any idea why the date isn't being translated to Portuguese?

I tried debugging date() to see what was going on inside, but I guess it's a built-in because I couldn't get inside it.

Thanks in advance.[/quote]

You're trying to change the language of codeigniter when you need to change the language of PHP.




Theme © iAndrew 2016 - Forum software by © MyBB