<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi George,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Have you added anything to ~/archives/ARCHIVEID/cfg/cfg.d/languages.pl?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">By default it’s something like:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$c->{defaultlanguage} = 'en';<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$c->{languages} = [ 'en' ];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">You should add the new language in the second option e.g.:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$c->{languages} = [ 'en', 'el' ];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The newer way of doing things is shown in this EPrints Bazaar package (unfortunately for Spanish, not Greek):
<a href="http://bazaar.eprints.org/227/">http://bazaar.eprints.org/227/</a> . In the file x_lang_es.pl, it achieves the same thing with:
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">push @{$c->{languages}},'es';<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’d take this Bazaar package as a base for how to do things – e.g. which files would need to be translated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Many of the phrases would exist in the 3.0 translation you’ve installed – but some won’t.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Let me know if that gets you any further down the path – and we can go from there!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">PS I don’t have any real experience of working with multi-lingual repositories – but have tried to learn bits!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> eprints-tech-bounces@ecs.soton.ac.uk
[mailto:eprints-tech-bounces@ecs.soton.ac.uk] <b>On Behalf Of </b>George Mamalakis<br>
<b>Sent:</b> 15 May 2015 13:13<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] Re: Antwort: Multilingual site<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Martin, hi and thanks for your answer!<br>
<br>
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.<br>
<br>
I have used Chrome, Firefox and Opera and it won't work in any of them.<br>
<br>
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...<br>
<br>
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.<br>
<br>
Thanks again for your answer!<br>
<br>
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:
<a href="http://stackoverflow.com/questions/30254057/eprints-multilingual-site">http://stackoverflow.com/questions/30254057/eprints-multilingual-site</a><br>
<br>
On 15/05/2015 11:03 πμ, <a href="mailto:martin.braendle@id.uzh.ch">martin.braendle@id.uzh.ch</a> wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Hi,</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">two questions come to my mind:</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">- did you run bin/generate_static your_repo --prune ?</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">- 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.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">A possible patch is:</span><br>
<br>
<tt><span style="font-size:10.0pt">Modified: trunk/src/core/perl_lib/EPrints/Repository.pm</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>===================================================================</tt><br>
<tt>--- trunk/src/core/perl_lib/EPrints/Repository.pm 2014-08-12 12:23:41 UTC (rev 857)</tt><br>
<tt>+++ trunk/src/core/perl_lib/EPrints/Repository.pm 2014-09-10 13:00:28 UTC (rev 858)</tt><br>
<tt>@@ -2264,6 +2264,8 @@</tt><br>
<tt>foreach my $browser_lang ( split( /, */, $accept_language ) )</tt><br>
<tt>{</tt><br>
<tt>$browser_lang =~ s/;.*$//;</tt><br>
<tt>+ # UZH CHANGE ZORA-274 fix for Safari browser 2014/08/15/mb</tt><br>
<tt>+ $browser_lang =~ s/-.*$//;</tt><br>
<tt>push @prefs, $browser_lang;</tt><br>
<tt>}</tt><br>
<tt>}</tt></span><br>
<br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Best regards,</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Martin</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">--</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Dr. Martin Brändle</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Zentrale Informatik</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Universität Zürich</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Winterthurerstr. 190</span><br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">CH-8057 Zürich</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>George Mamalakis<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>IT and Security Officer, <o:p></o:p></pre>
<pre>Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),<o:p></o:p></pre>
<pre>PhD (Aristotle Univ. of Thessaloniki),<o:p></o:p></pre>
<pre>MSc (Imperial College of London)<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>School of Electrical and Computer Engineering<o:p></o:p></pre>
<pre>Aristotle University of Thessaloniki<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>phone number : +30 (2310) 994379<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
</div>
</body>
</html>