OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Bilingual title, abstract and keywords at same article page

OJS development discussion, enhancement requests, third-party patches and plug-ins.

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

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

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, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Bilingual title, abstract and keywords at same article page

Postby smanaer » Tue Sep 17, 2013 4:17 am

Hello,

I am currently trying to display at the item detail page teh title, abstract and keywords in English and Spanish (both), without changing the language using the drop down box

I have read other threads but I have not gotten anything

Someone could help me?

Thanks in advance
smanaer
 
Posts: 2
Joined: Tue Sep 17, 2013 4:04 am

Re: Bilingual title, abstract and keywords at same article p

Postby asmecher » Tue Sep 17, 2013 8:59 am

Hi smanaer,

The template code to display the article title in the current locale is...
Code: Select all
{$article->getLocalizedTitle()|strip_unsafe_html}
To get the title in a specific language, use instead...
Code: Select all
{$article->getTitle('en_US')|strip_unsafe|html}
...where en_US is for English, es_ES is for Spanish, etc.

For abstracts and keywords it's the same -- use $article->getAbstract(...) instead of $article->getLocalizedAbstract, and $article->getSubject(...) instead of $article->getLocalizedSubject().

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

Re: Bilingual title, abstract and keywords at same article p

Postby smanaer » Wed Sep 18, 2013 3:50 am

Thank you very much,

works perfectly

Regards
smanaer
 
Posts: 2
Joined: Tue Sep 17, 2013 4:04 am

Re: Bilingual title, abstract and keywords at same article p

Postby somisa » Tue Jan 28, 2014 6:14 am

Hi Alec,

I also would like to use bilingual feature on my own OJS. My question is which files need to be changed? Where can I find these?
Is there any offical solution available? For example a plugin?
I use OJS 2.4.3 .

Thank you very much for your answer in advance.
Best regards,
András
somisa
 
Posts: 2
Joined: Tue Jan 28, 2014 3:37 am

Re: Bilingual title, abstract and keywords at same article p

Postby asmecher » Tue Jan 28, 2014 6:29 am

Hi András,

If you want to display this on the article page, then you'll want to modify the templates/article/article.tpl template.

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

Re: Bilingual title, abstract and keywords at same article p

Postby somisa » Tue Jan 28, 2014 7:07 am

Hi Alec,

Thank you very much your answer. I tried it but this wasn't solve my problem.
I would like to set up the submission registration page for authors. The author must be able to fill the title, abstract and keywords fields both of language because our journal use two language, Hungarian and English too.

Please, help me in this question.
Regards,
András Somos
somisa
 
Posts: 2
Joined: Tue Jan 28, 2014 3:37 am

Re: Bilingual title, abstract and keywords at same article p

Postby asmecher » Tue Jan 28, 2014 7:23 am

Hi András,

The relevant template for the submission process (step 3) is templates/author/submit/step3.tpl; you'll probably also have to adapt the form language chooser, implemented in lib/pkp/classes/form/Form.inc.php in the smartyFormLanguageChooser function, and the corresponding form class, classes/author/form/submit/AuthorSubmitStep3Form.inc.php, to prevent the standard form language chooser from interfering with the fields you want to have entered directly on the page.

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


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest