OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Sections headings in different languages

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Sections headings in different languages

Postby spliff » Sun Jun 24, 2007 4:01 am

Hi Alec,

I wondered whether I could give the section headings in different languages, depending on the language the user chooses.
I tried to insert a second "title locale" in the xml-import file, but with no success:

Code: Select all
<title locale="en_US">Reviews</title>
<abbrev locale="en_US">Rev.</abbrev>
<title locale="de_DE">Rezensionen</title>
<abbrev locale="de_DE">Rez.</abbrev>


The same is the case with the title of "volume/number". I noticed that the title is translated (i.e. for instance Vol 1, no 1<-> Bd. 1, Nr. 1) if the article underwent the normal submission process, but not if it is imported via xml.

Best regards
spliff
 
Posts: 28
Joined: Thu Jun 14, 2007 8:23 am
Location: Switzerland

Postby asmecher » Sun Jun 24, 2007 10:06 am

Hi spliff,

One of the major enhancements for OJS 2.2 will be an improvement in OJS's multilingual capacities, e.g. to support multilingual section titles, article metadata, journal metadata, and so on. In the meantime, you could do a quick hack: set all of your section titles to valid locale keys, e.g. entries that you've added to the main locale file; then change the last line of the implementation of classes/journal/Section.inc.php from:
Code: Select all
return $title;
...to
Code: Select all
return Locale::translate($title);
This hasn't been tested, but should work. Please let me know if you have any difficulty with it.

When you imported via XML, did you specify the issue ID using the <volume>, <number>, and <year> tags, or did you use a <title> tag? Check the issue identification settings on the Issue Data page by going to Back Issues as Editor.

Regards,
Alec Smecher
Public Knowledge Project Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8315
Joined: Wed Aug 10, 2005 12:56 pm

Postby spliff » Mon Jun 25, 2007 1:22 pm

Hi Alec,

You even work at weekends... :shock:

I did the import using these tags:

Code: Select all
<title>Vol 10, No 2 (1970)</title>
<volume>10</volume>
<number>2</number>
<year>1970</year>


In case of the title I can certainly wait for OJS 2.2, because "vol" and "no" are kind of self-explanatory.

In the meantime, you could do a quick hack: set all of your section titles to valid locale keys, e.g. entries that you've added to the main locale file


Embarrassing question: which one is the "main locale file"?
Is there a release timetable of OJS 2.2? (I am just curious)

Best regards
spliff
 
Posts: 28
Joined: Thu Jun 14, 2007 8:23 am
Location: Switzerland

Postby asmecher » Mon Jun 25, 2007 1:56 pm

Hi Spliff,

We're aiming for a release of OJS 2.2 this fall. In the meantime, the locale file you need to modify is locale/en_US/locale.xml (where the en_US is for English; you'll need to make similar modifications to the other locale files for other locales).

You can correct the identification on import by setting the "identification" attribute on the issue node to e.g. "num_vol_year". For all the options, look at the DTD (plugins/importexport/native/native.dtd) at approx. line 55.

Regards,
Alec Smecher
Public Knowledge Project Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8315
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 5 guests