-
AuthorPosts
-
jpalencia501307 Friend
jpalencia501307
- Join date:
- February 2011
- Posts:
- 12
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
April 19, 2011 at 1:07 am #162942I would like to change the date format to my spanish language, how can I do this?
Thanks in advance….
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
April 19, 2011 at 7:12 am #387024Hi,
Where section do you want to change? And How? A snapshot with your comment is very helpfuljpalencia501307 Friendjpalencia501307
- Join date:
- February 2011
- Posts:
- 12
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
April 19, 2011 at 12:24 pm #387089The sections are the frontpage content, and the article…. the actually format is showed like 20 april 2010, I like to change to “20 Abril 2010”
Thanks in advanced…
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
April 20, 2011 at 5:12 am #387189Hi,
You try change these values from <joomla url>languageen-GBen-GB.ini file
JANUARY_SHORT="Jan"
JANUARY="January"
FEBRUARY_SHORT="Feb"
FEBRUARY="February"
MARCH_SHORT="Mar"
MARCH="March"
APRIL_SHORT="Apr"
APRIL="April"
MAY_SHORT="May"
MAY="May"
JUNE_SHORT="Jun"
JUNE="June"
JULY_SHORT="Jul"
JULY="July"
AUGUST_SHORT="Aug"
AUGUST="August"
SEPTEMBER_SHORT="Sep"
SEPTEMBER="September"
OCTOBER_SHORT="Oct"
OCTOBER="October"
NOVEMBER_SHORT="Nov"
NOVEMBER="November"
DECEMBER_SHORT="Dec"
DECEMBER="December"
alakentu Friendalakentu
- Join date:
- May 2009
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 2 times in 1 posts
April 24, 2011 at 7:37 pm #387857Hi everyone,
As you said Khoand, change the English language file, but it is not.
I’ve managed to change the date format from English to Spanish editing the template files.
The files to edit are:
<blockquote>joomla_route/templates/ja_events/html/com_content/article/default.php</blockquote>
Near the line #88 to #97Default is:
[PHP]<?php if ($params->get(‘show_create_date’)) : ?>
<dd class=”create”>
<?php
$createDay = date(‘d’, strtotime( $this->item->created));
$createMonth = date(‘M’, strtotime( $this->item->created));
?>
<span class=”date”><?php echo $createDay; ?></span>
<span class=”month”><?php echo $createMonth; ?></span>
</dd>
<?php endif; ?>[/PHP]Change to:
[PHP]<?php if ($params->get(‘show_create_date’)) : ?>
<dd class=”create”>
<?php
$createDay = date(‘d’, strtotime( $this->item->created));
$createMonth = JHTML::_(‘date’, $this->item->created, JText::_(‘M’));
?>
<span class=”date”><?php echo $createDay; ?></span>
<span class=”month”><?php echo $createMonth; ?></span>
</dd>
<?php endif; ?>[/PHP]<blockquote>joomla_route/templates/ja_events/html/com_content/category/blog_item.php</blockquote>
Near the line #53 to #62Default is:
[PHP]<?php if ($params->get(‘show_create_date’)) : ?>
<dd class=”create”>
<?php
$createDay = date(‘d’, strtotime( $this->item->created));
$createMonth = date(‘M’, strtotime( $this->item->created));
?>
<span class=”date”><?php echo $createDay; ?></span>
<span class=”month”><?php echo $createMonth; ?></span>
</dd>
<?php endif; ?>[/PHP]Change to:
And,
<blockquote>joomla_route/templates/ja_events/html/com_content/featured/default_item.php</blockquote> Near the line #124 to #136
Default is:
<div class=”inner clearfix”>
[PHP] <?php
if ($this->params->get(‘show_create_date’)) :
$createDay = date(‘d’, strtotime( $this->item->created));
$createMonth = JHTML::_(‘date’, $this->item->created, JText::_(‘M’));
$createYear = date(‘Y’, strtotime( $this->item->created));
?>
<div class=”articleCreated”>
<span class=”date”><?php echo $createDay; ?></span>
<span class=”month”><?php echo $createMonth; ?></span>
<span class=”year”><?php echo $createYear; ?></span>
</div>
<?php endif; ?>[/PHP]Change to:
[PHP] <?php
if ($this->params->get(‘show_create_date’)) :
$createDay = date(‘d’, strtotime( $this->item->created));
$createMonth = JHTML::_(‘date’, $this->item->created, JText::_(‘M’));
$createYear = date(‘Y’, strtotime( $this->item->created));
?>
<div class=”articleCreated”>
<span class=”date”><?php echo $createDay; ?></span>
<span class=”month”><?php echo $createMonth; ?></span>
<span class=”year”><?php echo $createYear; ?></span>
</div>
<?php endif; ?>[/PHP]Best regards.
jpalencia501307 Friendjpalencia501307
- Join date:
- February 2011
- Posts:
- 12
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
April 25, 2011 at 12:04 am #387883Thank you both for your answers, but none has been successful.
I’m working with a local server (wamp) for testing before getting online web site.
Friend, alakentu
I have taken the suggestion you gave me, but your sample code seems to have changed, and it is not exactly like your samples.
However, when opening files which I already knew, I found this command line in common: “$createMonth = date(‘M’, strtotime( $this->article->created));”
This line only appears in the files:
default.php
default_item.phpAccording to what you indicate as samples that line is that I changed to this new line: “$createMonth = JHTML::_(‘date’, $this->item->created, JText::_(‘M’));” to show the month in Spanish
I made that change in the two files that you indicated above, but only shows me the format as follows: 18 M 2010
In the remaining file “blog_item.php” there is no line like you indicate to change. There is no code like that you mentioned to change.
Thanks in advanced.
PLEASE HELP ME TO SOLVE THIS, I NEED TO DELIVER THE PROJECT THIS WEEK, AND SHOW THE RIGHT WAY DATE FORMATS.
alakentu Friendalakentu
- Join date:
- May 2009
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 2 times in 1 posts
April 25, 2011 at 1:36 am #387888That version of the template you are using? What I replied is to be applied to version 1.0.0 Beta for Joomla 1.6.
Anyway, if you use the version for Joomla 1.5.X should be different.
default.php and default_item.php files for the route:
<blockquote>templatesja_eventshtmlcom_contentarticle in the line #49 and
templatesja_eventshtmlcom_contentfrontpage in the line #120</blockquote>Change:
[PHP]$createMonth = date(‘M’, strtotime( $this->article->created)); [/PHP]
To:
[PHP]$createMonth = JHTML::_(‘date’, $this->article->created, JText::_(‘%b’));[/PHP]
2 users say Thank You to alakentu for this useful post
jpalencia501307 Friendjpalencia501307
- Join date:
- February 2011
- Posts:
- 12
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
April 25, 2011 at 1:27 pm #388005Dear Friend, Alakentu
Thanks for your help, it really has been invaluable, I could solve the problem. However, we must clarify the following:
1 .- I’m using joomla 1.5.23
2 .- The line to change is different in each file, to:
File: default.php
<blockquote> templatesja_eventshtmlcom_contentarticle in the line #49 and #168 </blockquote>
Use this: [PHP]$createMonth = JHTML::_(‘date’, $this->article->created, JText::_(‘%b’));[/PHP]and
File: default_item.php
<blockquote>templatesja_eventshtmlcom_contentfrontpage in the line #120</blockquote>Use this: [PHP]$createMonth = JHTML::_(‘date’, $this->item->created, JText::_(‘%b’));[/PHP]
I hope this is helpful to others. Success for all.:)
alakentu Friendalakentu
- Join date:
- May 2009
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 2 times in 1 posts
April 25, 2011 at 11:32 pm #388172Hello,
Yes, exactly as in both cases the original code is: [PHP]$createMonth = date(‘M’, strtotime( $this->article->created)); [/PHP]
Just change it by and let you see results.
micheltorres Friendmicheltorres
- Join date:
- March 2008
- Posts:
- 171
- Downloads:
- 4
- Uploads:
- 25
- Thanks:
- 36
- Thanked:
- 2 times in 1 posts
June 24, 2011 at 12:37 am #398127Does not work! If I follow the suggestion, the site returns the default date set (in my case America / Sao Paulo).
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
June 26, 2011 at 1:22 pm #398477<em>@micheltorres 249267 wrote:</em><blockquote>Does not work! If I follow the suggestion, the site returns the default date set (in my case America / Sao Paulo).</blockquote>
What version of joomla do you use? Could you give me username+password of ftp?micheltorres Friendmicheltorres
- Join date:
- March 2008
- Posts:
- 171
- Downloads:
- 4
- Uploads:
- 25
- Thanks:
- 36
- Thanked:
- 2 times in 1 posts
June 26, 2011 at 2:17 pm #398480Hello khoand,
You’ve solved the issue in topic http://www.joomlart.com/forums/topic/change-language-in-a-data-label-in-articles/#post-398266
Thank you again!
-
AuthorPosts
This topic contains 12 replies, has 4 voices, and was last updated by micheltorres 13 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum