Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [SMARTY] Problem with languages
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,$sel
ected_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','janvie
r',
 'février','mars','avril','mai','juin','j
uillet',
 '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=$ti
me start_year="1950" end_year="+1"}
>
>But this return date in english and I want it in spanish. When I put this a
t 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.
>
>
>
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Mario St-Gelais
04-14-05 08:59 AM


Re: [SMARTY] Problem with languages
On Wed, Apr 13, 2005 at 11:00:03PM -0400, Mario St-Gelais wrote:
> I tried to use html_select_date without much success.  In my case, I
> wanted the month to appear in French.

Ask your system administrator to enable french locale settings for
you.

>  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,$sel
ected_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','janvie
r',
>     'février','mars','avril','mai','juin','j
uillet',
>     'août','septembre','octobre','novembre',
'décembre'));
>
> Maybe not the best option but it does the trick
>
> Reynier Perez Mira wrote:
> 
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Report this thread to moderator Post Follow-up to this message
Old Post
Messju Mohr
04-14-05 01:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:10 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.