Dsplaying localized metadata in OJS 3


I have two questions regarding metadata localization in OJS

  1. Can I control which version is displayed in the TOC? For example, if I have an article which is written in Italian, I want the Italian title to be displayed regardless of the UI’s language.

  2. Can I display all the localized information I have in the article’s page? (All versions of the title, abstract and keywords).

A little bit of background, just to be more clear. I have imported (using OJS’s native XML import tool) the metadata of a journal which so far has only had a printed version. This means that, at least for the time being, I will only publish the articles’ metadata and won’t have galleys. The journal receives contributions in different languages (mostly Spanish and English, but also Italian, French and German). Regardless of the article’s language, there’s usually a Spanish and an English version of the title, abstract and keywords. We want to preserve that for indexation purposes. However, in the TOC we want to show the original titles in the language in which the article was written.

Thanks in advance for your help!

Andrés Gattinoni

edit: I had a doubt on how to edit the localized metadata but have just figured out how to do it :slight_smile:

  1. OJS will show the localization based on the UI language. But I guess you could edit the templates so that they always show for example the journal default language or the default language of the given article. At the moment the code uses calls like $article->getLocalizedTitle which will be based on the UI language. But I think you could do $article->getTitle($article->getLocale()) instead for example here: https://github.com/pkp/ojs/blob/master/templates/frontend/objects/article_summary.tpl#L34

  2. Again by editing the template this should be possible. I am planning to change our theme so that all abstract versions are shown, because many journals tend to paste the abstract in several languages to a single field in order to show them all on the abstract page. Do not have the code ready, but should not be anything complicated. Probably doable in the template using smarty.

1 Like

Great! Thank you for your quick reply. I should try adapting the templates then.

BTW, I found what I think may be a bug, but which worked in my favour. In the case of this journal, the language of the abstracts and keywords do not depend on the language of the article. They are both (and only) in Spanish and English, regardless of whether the text of the article is in Italian, French or Deutsch.

Probably because of an error I made during the import, I had to edit the metadata of some articles which were recorded as Spanish but which were actually written in other languages. I managed to do it just fine. However, now I cannot edit those articles again because it asks me to complete the abstract in the language of the article (that is, if the article is in Italian I need to provide an Italian abstract, and so on).

I believe that if there is such a requirement, the validation should have been done before allowing me to change the language of the article. Luckily it didn’t and, if it were up to me, I would remove that requirement.