|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
DESUS Smarty n00b
Joined: 15 Nov 2005 Posts: 1
|
Posted: Tue Nov 15, 2005 9:54 pm Post subject: Date em portugues |
|
|
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 |
|
migas Smarty Regular
Joined: 07 Apr 2004 Posts: 73 Location: Porto, Portugal
|
Posted: Fri Nov 18, 2005 12:13 am Post subject: |
|
|
Já te podia ter respondido mas o teu post passou-me ao lado
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 |
|
|
|
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
|