Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2004-09-25 20:34:54
- sagariha
- New Member
- Registered: 2004-05-08
- Posts: 7
German "Time since posted" localisation
As it was asked in some topics how to change the Time since from english to german – here the way i did it:
Look for the publish.php (in the main-directory)
Open it in a PHP- or Text-Editor
Goto line 538 (Vers. 1rc1)
And replace the entire “function since($stamp)”-Block with the following:
<pre><code>
function since($stamp)
{
$diff = (time() – $stamp);
if ($diff <= 3600) {
$mins = round($diff / 60);
$since = ($mins<=1) ? ($mins==1) ? “1 Minute” : “einigen Sekunden” : “$mins Minuten”;
} else if (($diff <= 86400) && ($diff > 3600)) {
$hours = round($diff / 3600);
$since = ($hours <= 1) ? “1 Stunde” : “$hours Stunden”;
} else if ($diff >= 86400) {
$days = round($diff / 86400);
$since = ($days <= 1) ? “1 Tag” : “$days Tagen”;
}
return “vor “.$since;
}
</code></pre>
- and Save please!
From now on the “Posted” tag should appear in German.
Offline
Re: German "Time since posted" localisation
(fixed to display properly)
text*
Offline
#3 2004-10-13 10:43:13
- fm
- New Member
- From: Hannover, Germany
- Registered: 2004-10-08
- Posts: 3
Re: German "Time since posted" localisation
Thanx sagariha,
I’ve been looking exactly for this! Great!
Offline
#4 2004-10-14 09:17:09
- shelest
- New Member
- From: Yaroslavl, Russia
- Registered: 2004-10-07
- Posts: 2
Re: German "Time since posted" localisation
Dean, as you concern to carrying out of these line variables: “1 Minute”, “einigen Sekunden”… in a file of language constants?
I think, it would be correct.
Offline
Pages: 1