Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Date em portugues

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Portuguese
View previous topic :: View next topic  
Author Message
DESUS
Smarty n00b


Joined: 15 Nov 2005
Posts: 1

PostPosted: Tue Nov 15, 2005 9:54 pm    Post subject: Date em portugues Reply with quote

A nova versão do xoops vem com data no formato em inglês, no php já consegui isso usando array, mas no smarty não sei como ficaria.

Tuesday, 15 November 2005

para

Ter, 15 de novembro de 2005

=================================================

No html o codigo é assim...

<td id="date">
<{$smarty.now|date_format:"%A, %e %B %Y"}>
</td>
Back to top
View user's profile Send private message
migas
Smarty Regular


Joined: 07 Apr 2004
Posts: 73
Location: Porto, Portugal

PostPosted: Fri Nov 18, 2005 12:13 am    Post subject: Reply with quote

Já te podia ter respondido mas o teu post passou-me ao lado Sad

Aqui vai.

Para consguires por a data em português tens de incluir
[php:1:7b2911614f]
<?php
#LC_ALL converte todas as definições do php para portugues inclusive a moeda
# LC_TIME só as horas podes
setlocale(LC_ALL,'pt_PT');
?>
[/php:1:7b2911614f]
no php mas também já vi por ai um plugin que permite fazer isso directamente no tpl.

Para converter também a Time Zone para portugues usa.
[php:1:7b2911614f]putenv('TZ=Europe/Lisbon'); [/php:1:7b2911614f]

Ainda não testei nem li se o setlocale muda também a time zone por isso eu costumo usar os dois.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Portuguese All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP