[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] render a field value in other than current language



Thanks!

this already works for Subscriptions, nice catch!


Il 04/07/2016 17:08, Enio Carboni ha scritto:
>
> Hi Yuri,
>
> i think you can try:
>
> $repo->change_lang('it');
>
> my $a_field_it = $eprint->render_value("a_field");
>
> $repo->change_lang('en');
>
> my $a_field_en = $eprint->render_value("a_field");
>
> Enio
>
> In data luned? 4 luglio 2016 16:13:09 CEST, Yuri ha scritto:
>
> > Hi!
>
> >
>
> > I'm sending an email from Eprints (workflow step). The mail is
>
> > multilang (italian and english), so I would like to reuse existing
>
> > render_value/citation (document citation, compound fields like names)
>
> > but they are displayed in the current language. Is it possible to pass
>
> > an option to render_value/citation in eprints to have the field rendered
>
> > in a different language?
>
> >
>
> > For example, something like:
>
> >
>
> > my $a_field_it = $eprint->render_value("a_field", langid="it");
>
> > my $a_field_en = $eprint->render_value("a_field", langid="en");
>
> >
>
> > where a_field is a compound and:
>
> >
>
> > $doctd->appendChild( $doc->render_citation_link(langid="it") );
>
> >
>
> > for a document citation.
>
> >
>
> > Thanks for any help/hint!
>
> >
>
> > *** Options: 
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>
> > *** Archive: http://www.eprints.org/tech.php/
>
> > *** EPrints community wiki: http://wiki.eprints.org/
>
> > *** EPrints developers Forum: http://forum.eprints.org/
>
>
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/

-- 
Yuri Carrer

  CAB - Centro di Ateneo per le Biblioteche, Universit? di Padova
  Tel: 049/827 3615 - Via Anghinoni, 3 - Padova