Categories > TinyButStrong general >

Problems with german date

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: ClausVB
Date: 2005-03-26
Time: 22:06

Problems with german date

I want to display a german date.

I tried to use your param "locale" with your example
tbs_us_examples_prmfrm.php

In your source you can read
if (isset($Loc->PrmLst['locale'])) {
    return strftime($Frm['str_loc'],$Value);
} else {
    return date($Frm['str_us'],$Value);
}
in line 2436 - 2441 ("tbs_class.php").

It should be possible to activate "locale" in the template, but I do not get it. Since I am searching and trying for over half an hour now, I am asking for help here.

Thanks and regards,
Claus
By: ClausVB
Date: 2005-03-27
Time: 00:47

Re: Problems with german date

Sorry, I made a mistake.

It works like that:
setlocale(LC_ALL, 'german');
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('tbs_us_examples_prmfrm.htm') ;
$TBS->Show();

and in the template:

<tr class="back-special2">
    <td>dddd dd mmmm</td>
    <td>[var..now;frm='dddd dd mmmm';locale]</td>
</tr>