EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #04240


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Antwort: Multilingual site


Martin, hi and thanks for your answer!

I have generated static, the html folder of my deposit has been populated with the correct html files (I've looked into their content), and when I select the Greek language through an href (on an image), as I said, it displays the "language has changed" page in Greek, but when I click on any link (menu, whatever) the content served is in English.

I have used Chrome, Firefox and Opera and it won't work in any of them.

I have to re-inform you that I installed the Greek translation (which is for a previous version of eprints, 3.0) without using any guide, which means that I just copied the folders contained in the zip file where it seemed appropriate (./lib/defaultcfg and ./lib/lang in the eprints folder, and cfg/lang/el in the specific archive). As I read in eprints' documentation regarding previous versions (<3), a few stuff needed to be done in order to install translations, that didn't seem "compatible" with my version. Maybe I am missing something here...

If not, then I am not sure what part of eprints' core functionality fails and doesn't load the language correctly or if the problem is related to the set_lang script.

Thanks again for your answer!

PS. I wasn't sure about the activity of this list, so a few hours ago (before receiving your answer) I started an analogous question in stackoverflow: http://stackoverflow.com/questions/30254057/eprints-multilingual-site

On 15/05/2015 11:03 πμ, martin.braendle@id.uzh.ch wrote:

Hi,

two questions come to my mind:

- did you run bin/generate_static  your_repo --prune    ?
- which browser did you use to test? Safari sends a slightly different Accept-Language token in the HTTP header, which is not properly recognized by Repository.pm.

A possible patch is:

Modified: trunk/src/core/perl_lib/EPrints/Repository.pm
===================================================================
--- trunk/src/core/perl_lib/EPrints/Repository.pm 2014-08-12 12:23:41 UTC (rev 857)
+++ trunk/src/core/perl_lib/EPrints/Repository.pm 2014-09-10 13:00:28 UTC (rev 858)
@@ -2264,6 +2264,8 @@
foreach my $browser_lang ( split( /, */, $accept_language ) )
{
$browser_lang =~ s/;.*$//;
+ # UZH CHANGE ZORA-274 fix for Safari browser 2014/08/15/mb
+ $browser_lang =~ s/-.*$//;
push @prefs, $browser_lang;
}
}



Best regards,

Martin
 
--
Dr. Martin Brändle
Zentrale Informatik
Universität Zürich
Winterthurerstr. 190
CH-8057 Zürich



-- 
George Mamalakis

IT and Security Officer, 
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
PhD (Aristotle Univ. of Thessaloniki),
MSc (Imperial College of London)

School of Electrical and Computer Engineering
Aristotle University of Thessaloniki

phone number : +30 (2310) 994379