Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Translation
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Selecting the session's language === In a multilingual site you probably let the visitors to choose the language of the session. It is determined by the default setting of the browser preferences, but sometimes users want to change this. Manual setting of the session's language can be done by the [http://files.eprints.org/264/ port] of the ''set_language'' script from earlier Eprints versions, and should go into the [[EPrints_Directory_Structure/eprints3/cgi|cgi]] directory. A handy place for the set_language URL is in the menu at the top of the page. As the the default page template is repository dependent, you should edit [[EPrints_Directory_Structure/eprints3/archives/ARCHIVEID/cfg/lang/en/templates|archives/ArchiveID/lang/en/templates/default.xml]], the English language template for that repository as follows (but see the remarks above): <ul class="ep_tm_menu"> <li><a href="{$config{frontpage}}">Home</a></li> <li><a href="{$config{perl_url}}/set_lang">Language</a></li> <li><a href="{$config{base_url}}/information.html">About</a></li> ... </ul> The template page on other languages should not contain this ''Language'' item as not necessarily will people recognise it. Rather use a button which reverts the language to English, i.e. insert the following into [[EPrints_Directory_Structure/eprints3/archives/ARCHIVEID/cfg/lang/en/templates|archives/ArchiveID/lang/XX/templates/default.xml]] for all other languages XX except for English: <li><a href="{$config{perl_url}}/set_lang?langid=en">In English</a></li> If you want a little more fancy layout, you might consider using [http://files.eprints.org/40/ flag images] to be copied to the directory [[EPrints_Directory_Structure/eprints3/lib/static/style/images|lib/static/style/images/flags/]]. If you define a phrase (see the [[#Phrases|Phrases]] section) of the form "cgi/set_lang:lang_XX" then the set_lang script will use that phrase to render a link to that language. A typical format could be <epp:phrase id="cgi/set_lang:lang_hu"><epc:pin name="link"> <img src="/style/images/flags/flag_hu.png" alt="[hu]" /> Hungarian</epc:pin> </epp:phrase>
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)