OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Locales in Harvester 2.3

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
Developer Resources:

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome.

Locales in Harvester 2.3

Postby josipkp » Wed Jun 10, 2009 7:36 pm

Hi,

We are harvesting journals in OJS format.
We would like to receive first the (titles, subjects, descriptions and rights) in the default locale and then, in English, in Spanish, in French and in Italian, the languages accepted in this portal.
Following the database order, we browse the records in no specific order considering the locale: we have titles in English when there are Portuguese titles.

In OJS, in classes/oai/ojs, we was trying to put something like
<SQL to retrive article_settings> order by locale="pt_BR", locale="en_US", locale="es_ES",locale="fr_CA",locale="it_IT";
but the function getDataObjectSettings in classes/db/DAO.inc.php is a generic routine.

But this, not sounds good, because we can change our installation, but not the others.
Then, we think if this information it was in parsed_contents in the table records, it would be possible:
1) describes the language of the metadata (for example: description [pt] xxx [en] xxx [es] xxx and so)
2) show the browse record with titles in the default locale if exist, else in the second option, the third and so
3) show the metadata with a prefered locale order.

Could you give us a help?
Thank you in advance,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: Locales in Harvester 2.3

Postby asmecher » Wed Jun 17, 2009 11:44 am

Hi Josi,

What version of OJS are you using? The current release should be providing information in all languages via OAI (e.g. using Dublin Core).

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm

Re: Locales in Harvester 2.3

Postby josipkp » Wed Jun 17, 2009 6:06 pm

Hi,
Thank you for your answer.
Sorry, my English is not enough to explain the situation.

We are using OJS 2.2.2.
When importing OJS to Harvester2, all information comes. It is very good: all people could have OJS!

The problem is just the record view in Harvester2: many articles have title and abstract in Portuguese, English and Spanish and when they are harvested - despite the language in Harvester2 to be Portuguese - the title appears, for some articles, in English; for others, in Portuguese, and others, in Spanish.

When browsing archives or for searching answers, we would like to show the title in Portuguese if exist.
In Spanish for second option and then, in English.

I think Harvester2 receives this information from OJS following the database id field.
Could you give us any suggestion?

Thanks in advance,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: Locales in Harvester 2.3

Postby asmecher » Wed Jun 17, 2009 8:36 pm

Hi Josi,

So do you see the necessary information in the parsed_contents column?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm

Re: Locales in Harvester 2.3

Postby josipkp » Fri Jun 19, 2009 12:49 pm

Hi Alec Smecher,
Thank you for your interest in this subject.

No, the locale information is not in the parsed_content field, just in the contents field. For example:

contents
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title xml:lang="en_US">Analysis of Characteristics and Perception of Distance Learning Students: a longitudinal study on the Library Science Course of UFRGS</dc:title><dc:title xml:lang="pt_BR">Análise das Características e Percepção de Alunos de Educação a Distância no Curso de Biblioteconomia da UFRGS</dc:title><dc:creator> ...

parsed_contents
a:11:{s:5:"title";a:2:{i:0;s:133:"Analysis of Characteristics and Perception of Distance Learning Students: a longitudinal study on the Library Science Course of UFRGS";i:1;s:117:"Análise das Características e Percepção de Alunos de Educação a Distância no Curso de Biblioteconomia da UFRGS";}s:7:"creator";...

For the string "title" size 5 we have 2 results;
one: size 133, text "Analysis ..."
other: size 117, text "Análise ..."

How do you suggest insert the locale information?
i:0;s:138:"[en] Analysis of Characteristics...."
i:1;s:122:"[pt] Análise das Características..."

Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: Locales in Harvester 2.3

Postby asmecher » Fri Jun 19, 2009 6:07 pm

Hi Josi,

In that case, you'll need to modify the parseContents function in plugins/schemas/dc/DublinCorePlugin.inc.php to include this information so that it'll be made available to the record display template. Then you can rebuild the parsed contents by running tools/rebuildSearchIndex.php.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm


Return to Open Harvester Systems Support and Development

Who is online

Users browsing this forum: No registered users and 1 guest