<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">John Hi,<br>
<br>
Yes I've included el in the specific variable. To make things
easier for you, I'll repost what I've posted in stackoverflow:<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
"I have downloaded and unzipped the greek translation (for an
earlier version, 3.0, from the official site) on the folders that
seemed appropriate, I have placed the set_lang script in the cgi
folder and changed the template to use it, I have changed
languages.pl to include 'el' as well, I have re-generated statics
and now the html folder contains my Greek index.html, I have
restarted apache"<br>
<br>
Thank you for prompting me on the Spanish Language Pack, I'll see
what changes I'll have to still make in order to complete the
Greek translation. But before that, I hope I'll manage to see the
translated site :).<br>
<br>
As far as the plugin is concerned: apart from copying the set_lang
script on the cgi folder and adding appropriate content in the
template to use it (by calling cgi/set_lang?langid=el) is there
something else that needs to be done?<br>
<br>
Otherwise: as far as the core system is concerned. How does it
know that it is "ready" to start servicing a multilingual site? Is
it enough to add an additional language in $c->{languages} (of
~/archives/ARCHIVEID/cfg/cfg.d/languages.pl) and copy the
translation file in the cfg/lang/XX folder? Or does it need
something additional that I am missing?<br>
<br>
Thanks again for your time and help!<br>
<br>
On 15/05/2015 03:51 μμ, John Salter wrote:<br>
</div>
<blockquote
cite="mid:EMEW3|09b42853f95e76a77d73b5e19c981709r4EDqP14eprints-tech-bounces|ecs.soton.ac.uk|AMSPR03MB36074B598D0E3FFA8011B46C4C70@AMSPR03MB360.eurprd03.prod.outlook.com"
type="cite">
<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]-->
<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 moz-do-not-send="true"
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
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
lang="EN-US"> <a class="moz-txt-link-abbreviated" href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a>
[<a class="moz-txt-link-freetext" href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>] <b>On
Behalf Of </b>George Mamalakis<br>
<b>Sent:</b> 15 May 2015 13:13<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><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 moz-do-not-send="true"
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 moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
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
</pre>
</body>
</html>