View Full Version : Language in the Monthly Archive:
mogens
11-24-2005, 11:04 PM
I'm trying do keep my Photoblog in the Danish language.
I did edit the Language php-file and it all works fine.
Then I bagan to use the <BROWSE_MONTHLY_ARCHIVE_PAGED> tag and the name of the month is shown in English.
Is it possible to change this to Danish and where do I change it???
mogens
You must edit file with this addon.
oskarrr
01-26-2006, 07:43 AM
You must edit file with this addon.
What file must be etited? And where in the file is it? I´ve searched the addon-files but haven't found any "january" etc.
Connie
01-26-2006, 07:47 AM
could it be that the Addon just uses the date - function and that is by default with english text?
If so try to find information about how to set "Locale" to danish
I am sorry, I have no time in the moment for further assistance, as I am just taking a glimpse here in a break at work...
oskarrr
01-26-2006, 05:38 PM
The only thing i´ve found in the paged_archive.php file is this
{
if ($_GET['archivedate']=="")
{$images_category_or_date = $lang_browse_all;}
else
{$images_category_or_date = $_GET['monthname'];}
}
But i have no idea how to change this, or if it is this code that must be changed
oskarrr
01-29-2006, 03:12 PM
Shouldn't the writer of the script know how to do?
WebOliver
08-21-2007, 01:07 PM
I have the same question... I would like the month written in French... but I don't know how to do that...
http://www.unjourunephoto.ch/photoblog/mois.png
Dennis
08-21-2007, 02:46 PM
Check the french language files. Months are in there.
WebOliver
08-21-2007, 10:05 PM
Check the french language files. Months are in there.
Yes... but all is ok in the french language file... the month is in french. But not on my blog.
Zenigata
08-22-2007, 12:40 AM
Same problem for me. The name of months are in english. I've checked italian language file but it seems ok. Please help us, thanks.
WebOliver
08-26-2007, 12:50 PM
Any solution?
Dkozikowski
08-26-2007, 02:43 PM
I took a look at the file and it uses PHPs date() function so, this addon needs to be recoded to utilize PHPs different localization settings.
If anyone wants to take a stab at setting their local region, you can start by reading here, http://www.php.net/setlocale
A minute ago Ive made patch for this issue and in next release it should be fine (without playing with localization at PHP setttings level).
Zenigata
08-26-2007, 04:13 PM
A minute ago Ive made patch for this issue and in next release it should be fine (without playing with localization at PHP setttings level).
What have I to modify if I want this change now?
Thanks.
--- trunk/addons/paged_archive.php (original)
+++ trunk/addons/paged_archive.php Sun Aug 26 07:53:00 2007
@@ -222,14 +222,15 @@
$count = mysql_fetch_array($count);
$count= $count['count'];
$select_display_date=date("F, Y",strtotime($thedate."-01"));
+ $select_display_date2 = ucfirst(${"lang_".strtolower(date("F",strtotime($thedate."-01")))}) . date(", Y",strtotime($thedate."-01"));
$select_display_date_link=str_replace(" ","%20",$select_display_date);
$thedate = pullout($thedate);
preg_match('/(\w+),\s/', $select_display_date, $naturalmonth);
$natmonth = 'lang_'.strtolower($naturalmonth[1]);
$mynatmonth = $$natmonth;
$select_display_date=preg_replace('/\w+,(\s\d+)/', "$mynatmonth$1", $select_display_date);
- $archive_select .= "<option value='index.php?x=browse&archivedate=$thedate&mon thname=$select_display_date_link&pagenum=1'>$name (" .$select_display_date .") (" .$count .")</option>";
- $archive_select_links .= "<li><a href='index.php?x=browse&archivedate=$thedate&mont hname=$select_display_date_link&pagenum=1'>$name " .$select_display_date ." (" .$count .")</a></li>";
+ $archive_select .= "<option value='index.php?x=browse&archivedate=$thedate&mon thname=$select_display_date_link&pagenum=1'>$name (" .$select_display_date2 .") (" .$count .")</option>";
+ $archive_select_links .= "<li><a href='index.php?x=browse&archivedate=$thedate&mont hname=$select_display_date_link&pagenum=1'>$name " .$select_display_date2 ." (" .$count .")</a></li>";
};// end while
$archive_select .= "</select>";
$archive_select_links .= "</ul>";
@@ -262,9 +263,10 @@
$count= $count['count'];
$select_display_date=date("F, Y",strtotime($thedate."-01"));
+ $select_display_date2 = ucfirst(${"lang_".strtolower(date("F",strtotime($thedate."-01")))}) . date(", Y",strtotime($thedate."-01"));
$thedate = pullout($thedate);
- $archive_select .= "<option value='index.php?x=browse&archivedate=$thedate'>$name (" .$select_display_date .") (" .$count .")</option>";
- $archive_select_links .= "<li><a href='index.php?x=browse&archivedate=$thedate'>$name " .$select_display_date ." (" .$count .")</a></li>";
+ $archive_select .= "<option value='index.php?x=browse&archivedate=$thedate'>$name (" .$select_display_date2 .") (" .$count .")</option>";
+ $archive_select_links .= "<li><a href='index.php?x=browse&archivedate=$thedate'>$name " .$select_display_date2 ." (" .$count .")</a></li>";
}; // end while
$archive_select .= "</select>";
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.