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
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → [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
They aren't, PunBB uses PHP's date function.
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
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
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
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!
Hmm, you're right, I misread the documentation for date
PunBB Forums → PunBB 1.2 troubleshooting → [Solved] Where are the date expressions?
Powered by PunBB, supported by Informer Technologies, Inc.