EPrints Technical Mailing List Archive

Message: #04373


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: How to set a field to be multilang


Hi Tim,

I am facing some problems after applying the solution you proposed (which are probably all rational, but need to be addressed somehow):

- First of all, for previous documents, the existing title is not shown. Nor in the "Manage deposits" section, nor in "details" section (view part). Of course it exists in the database eprint.title field, but it's not showing anywhere else (I suppose this is logical, since the system doesn't know which language to display). Shouldn't all versions be displayed, as holds for other multi-row fields?
- When editing an existing record (or adding a new one), the title field is now a multi-rows field (it asks me to add more rows, where each row allows me to use a different language through a drop-down menu). Whenever I fill it out and save, EPrints warns me about not having filled it out (since it's "mandatory").
- On edit/add, after saving the value for a specific language, it's not shown after it has been saved, so I'm not quite sure if it has been saved in the database.
- In which database field are the new-field values stored?

Thanks for all the help so far!

On 24/06/2015 10:29 πμ, Timothy Miles-Board wrote:

---------- Forwarded message ----------
From: Timothy Miles-Board <timothy.miles-board@ulcc.ac.uk>
Date: 18 Jun 2015 11:30 pm
Subject: Re: [EP-tech] How to set a field to be multilang
To: eprints-tech@ecs.soton.ac.uk
Cc: 

{
     name => 'title',
     type => 'multilang',
     multiple => 1,
     fields => [ { sub_name => "text", type => "longtext", input_rows => 3, make_single_value_orderkey => 'EPrints::Extras::english_title_orderkey' } ],
     input_add_boxes => 1,
},


Tim

On 23 Jun 2015 9:09 am, George Mamalakis <mamalos@eng.auth.gr> wrote:
Guys (and girls),

Any news on multilingual fields? Anybody using them?

Thanks!

George

On 18/06/2015 06:31 μμ, George Mamalakis wrote:
> Hello again,
>
> I am trying to make my EPrints installation support multilanguage fields
> (eg. title, abstract, etc.). The thing I did that worked (which doesn't
> feel right to me, though) was adding a new Metadata field (eg. title_en)
> and add it to the database and workflow. On the documentation, on the
> other hand, I saw that there is a Multilang field type
> (./perl_lib/EPrints/MetaField/Multilang.pm) which should be used for
> this purpose. The strange thing is that its perldoc DESCRIPTION section
> starts with "not done", probably meaning that it's not implemented?
> Disregarding the last comment, when I changed
> ./archives/myarchive/cfg/cfg.d/eprint_fields.pl title field to read:
>
> {
>       name => 'title',
>       type => 'multilang',
>       input_rows => 3,
>       make_single_value_orderkey =>
> 'EPrints::Extras::english_title_orderkey',
> },
>
> and I reloaded epadmin, I got the following error:
>
> "Error in field property for eprint.title: fields on a multilang
> metafield can't be undefined"
>
> So, which is the proper way for adding multilanguage support in fields
> and display them in workflows?
>
> Thanks for all help in advance!
>


--
George Mamalakis

IT and Security Officer,
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
PhD (Aristotle Univ. of Thessaloniki),
MSc (Imperial College of London)

School of Electrical and Computer Engineering
Aristotle University of Thessaloniki

phone number : +30 (2310) 994379



*** 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/


-- 
George Mamalakis

IT and Security Officer, 
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
PhD (Aristotle Univ. of Thessaloniki),
MSc (Imperial College of London)

School of Electrical and Computer Engineering
Aristotle University of Thessaloniki

phone number : +30 (2310) 994379