MyBB Community Forums

Full Version: Dates not being translated
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

A user on our forum (ep2.nl) reported that the dates aren't being translated. So I investigated myself, and he's actually right.

When I set my date formating so that the full day and month name are being displayed, the English day and month names are shown, while the day and month names are perfectly set in the Dutch language files.

The only place where the months get translated, is in UserCp > Edit Profile > Birthday.

I included some screenshots to prove this ...
I guess these parts are not a subject to be translated at the moment, i'm not sure if it translation for these is possible in 1.2
i guess it is because they currently get the text from the server.

regards
You have to set the proper locale file, to get dates translated too and have to look like xx_XX.UTF-8

the most providers (HSP) moves allready to Unicode, except the forum...
so check first php infor before to make any changes
So this isn't a MyBB bug?
Right now it's a limitation
Are we going to create a my_date function thats multilingual? Toungue
hmm, I found something on the php site: http://www.php.net/manual/en/function.setlocale.php

Example:
<?php
/* Set locale to Dutch */
setlocale(LC_ALL, 'nld_nld');

/* Output: vrijdag 22 december 1978 */
echo strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));

/* try different possible locale names for german as of PHP 4.3.0 */
$loc_de = setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'deu_deu');
echo "Preferred locale for german on this system is '$loc_de'";
?> 
Then we'd need to convert the date format to strftime format.
Is there a problem with that? Toungue
Not really IMO.
Pages: 1 2