Hi,
I noticed that even if a tp translation is installed, the names of the months in frontpage remain in english.
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg12.imageshack.us%2Fimg12%2F4535%2Ftraduzione.th.jpg&hash=f8387762c2f72ac7ec54ae6065a8a6c4b48a6bc6) (http://img12.imageshack.us/my.php?image=traduzione.jpg)
How can I translate them?
For example, "May 03 2009" should be "Mag 03 2009".
Thank you in advance. :)
I'm using SMF 1.1.8 with the last TP beta.
That should be translated from the SMF files, TP just import the text from the SMF, so you have to check so the SMF language files you have are translated correctly.
What's wrong with my translation? ???
$txt['months'] = array(1 => 'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre');
$txt['months_titles'] = array(1 => 'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre');
$txt['months_short'] = array(1 => 'Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic');
Inside the forum the names of the months/days are translated... maybe it's a TP problem. Even if I change months names in index.english.php they remain in english. :idiot2:
I see you have utf8, did you add the utf8 language package for TP aswell ?
And does your forum run on utf8 ? Check in your Admin/configuration/Server Settings
What language is set there ? is it utf8 ?
Yep, it's running utf-8.
And then, did you add the utf8 language package for tp for your language aswell ?
Sure...
Then im clueless :-\
Maybe a little TP bug? :o
I asked in the italian support section (http://www.tinyportal.net/index.php/topic,29451.0.html) and others seem to have the same problem...
Hmmm, is this problem only on a post that is set to show on the Front Page? Can I see your site please where you see this? Link?
ZarPrime
http://www.mysammy.it I don't know if it's only with posts in frontpage, I don't use articles.
i think that tp uses php date functions. i could not find date string in tp source and lang files.
OK, I just wanted to see if the date was shown properly in your posts inside the Forum. OK, can you attach your Italian Language files to your next post here so that I can look at them. There are 7 files I want to look at (TP*.italian-utf8.php) where the asterisk is different for each file. Please put all 7 files into a zip file and attach it here.
ZarPrime
It's the translation I downloaded from tinyportal.co.uk. Btw thanks for the help. :)
OK, give me a little time to look at these as I'm doing 14 things at once. :idiot2:
NP on the help. That's what we're here for. I'll be back in a little bit.
ZP
Hi!
I have same problem and i think is in this code part (TPortal.template.php):
$ntime='
<span class="tp_month">' . date("M",$story['timestamp']). '</span><span class="tp_thindivider"> </span><span class="tp_day">'. date("d",$story['timestamp']) . '</span> <span class="tp_year"> '. date("Y",$story['timestamp']) . '</span>';but i don't have found any way to fix :)
OK, well, I've checked the language files and they appear to be right, or at least very close what the ones we have in the download section are (only a few small differences), so there is something else going on here. Dark Wolf, you may be right but I think I'm going to have to have Mr. Bloc take a look at this.
I have a theory. It may have something to do with an issue I brought up on the team board last week regarding shortened dates. Since Bloc will have to look, it's going to take me a while to see if this can be sorted out or whether it might be a bug. Bear with me for awhile, like more than a couple of days but hopefully less than a week. :)
ZarPrime
Ok ZarPrime, thank you. :)
fak,
OK, Bloc is looking at this and he immediately thought he knew what it was. You won't be able to read the message but according to him ...
Quote from: Bloc on May 03, 2009, 03:06:34 PM
I know what this is..the date function needs "setlocale" to be set, to get the correct language.I'll add and test asap.
I'll get back to this as soon as he finishes looking at it to see if it's an easy fix or whether you'll have to wait for the next beta.
ZarPrime
Nice one ZP n co!
I was looking at this also and thought it may be a regional setting for your server's php configuration...
See this: http://www.php.net/manual/en/function.setlocale.php
Follow a few of the examples (under the changelog) to check what your server is returning...
Hey Ianedres. :)
Example 1:
<?php
/* Set locale to Dutch */
setlocale(LC_ALL, 'nl_NL');
/* Output: vrijdag 22 december 1978 */
echo strftime("%A %e %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', 'de', 'ge');
echo "Preferred locale for german on this system is '$loc_de'";
?>
Returned:
vrijdag 22 december 1978Preferred locale for german on this system is 'de_DE@euro'
Example 2:
<?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'";
?>
Returned:
Friday 22 December 1978Preferred locale for german on this system is 'de_DE@euro'
I don't know what they mean. :buck2:
This sets the language to Italian on my United States server.
setlocale(LC_ALL, 'it_IT.ISO8859-1', 'it_IT.UTF-8');
By combining it with this next line, it outputs the date in Italian properly.
echo strftime("%A, %d %B %Y") . "\n";
Not sure where to place the setlocale in the TP scripts... Bloc?
fak3,
OK, per Bloc's request, and so that I don't have to keep watching this topic, I have posted this issue on the bugtracker. The link to the bug is here --> http://www.tinyportal.net/index.php?action=bugtracker;sa=bug498
If you are interested, I suggest you check the bugtracker once in a while to check on the status of this. Bloc will get to it and sort it out as soon as he can.
ZarPrime
Ok, I'll keep checking the bugtracker. ;) Thank you for the help.
http://www.tinyportal.net/index.php?action=bugtracker;sa=bug498
You have a fix there now.
@G6: thanks for your fix.
Edit:
but is TPortal.template.php and not TPBlocks.template.php ;)
Wasent me that fixed it, was our Bloc :)
And it's not always the obvious file the fixes are, this is one of those times ;)