|
Posted by Mario St-Gelais on 09/30/03 11:13
I tried to use html_select_date without much success. In my case, I
wanted the month to appear in French. So on my entry form i did :
<select name=selected_day_id>
{html_options values=$day_id
selected=$selected_day_id output=$day_id}
</select>
<select name=selected_month_id>
{html_options values=$month_id
selected=$selected_month_id output=$month_name}
</select>
<select name=selected_year_id>
{html_options values=$year_id
selected=$selected_year_id output=$year_id}
</select>
{assign var="ddn"
value="$selected_month_id,$selected_day_id,$selected_year_id"}
It is basically one html_option for each of day of the month, month of
the year and the year. I assign the values in variable "ddn" for
further processing. Then I have an array that assigns french month to
numeral month value like so :
$smarty->assign('month_id',array(0,1,2,3,4,5,6,7,8,9,10,11,12));
$smarty->assign('month_name',array('mois','janvier',
'février','mars','avril','mai','juin','juillet',
'août','septembre','octobre','novembre','décembre'));
Maybe not the best option but it does the trick
Reynier Perez Mira wrote:
>Hi list:
>
>I'm working with Smarty component {html_select_date prefix="fecha" time=$time start_year="1950" end_year="+1"}
>
>But this return date in english and I want it in spanish. When I put this at first into my php file
>
>setlocale(LC_ALL, 'es_ES);
>
>nothing happend and things come in english. How can I solve this problem?
>
>It's posible with Smarty? Exists any plugin or addons that return things in spanish format?
>
>Regards
>
>
>
>
>
>Reynier Pérez Mira
>
>3ero. Ing. Informática
>
>Entre más inteligente me siento, más me doy cuenta de lo ignorante que soy.
>
>
>
>
>
>
Navigation:
[Reply to this message]
|