1 (edited by wobo 2007-07-11 14:06)

Topic: [Solved] Where are the date expressions?

Where are the names of months and days listed (like 'January', 'February', 'Monday', Tuesday', etc)?
I ran a 'grep -R "January" ./*' on the complete punbb directory whithout a result.

wobo

FSFE Fellow #359 - The Freedom of Knowledge is a Human Right

Re: [Solved] Where are the date expressions?

They aren't, PunBB uses PHP's date function.

3

Re: [Solved] Where are the date expressions?

Oh! Thx for the info, I did not expect that, other forum software I know have them in their lang/common.php (or elsewhere).
Now, how am I supposed to translate these expressions into a different language?

wobo

FSFE Fellow #359 - The Freedom of Knowledge is a Human Right

Re: [Solved] Where are the date expressions?

wobo wrote:

Oh! Thx for the info, I did not expect that, other forum software I know have them in their lang/common.php (or elsewhere).

I would find that sort of odd, since it would mean they're making their own date/time function tongue

wobo wrote:

Now, how am I supposed to translate these expressions into a different language?

Add a line for setlocale in the language file. The English common.php file has an example of how to do it, you just need to replace LC_CTYPE with LC_ALL

5

Re: [Solved] Where are the date expressions?

Smartys wrote:

Add a line for setlocale in the language file. The English common.php file has an example of how to do it, you just need to replace LC_CTYPE with LC_ALL

Hmm, did that, did not change anything (yes, I emptied the cache). The problem was something else:
In the code (index.php) I have the line:

$thisdate = date('l, d F Y', $cur_topic['posted']);

This should read

$thisdate = strftime('%A, %d. %B %Y', $cur_topic['posted']);

to work as wanted. The PHP manual says, LC_ALL (LC_TIME) only works with strftime.

wobo
Look, mom, I'm learning PHP!

FSFE Fellow #359 - The Freedom of Knowledge is a Human Right

Re: [Solved] Where are the date expressions?

Hmm, you're right, I misread the documentation for date wink