eprints / orcid_support_advance

ORCID Support Advance plugin
1 stars 6 forks source link

Export fails for non standard languages #39

Closed dennmuel closed 5 years ago

dennmuel commented 5 years ago

Eprints that have "misc" or "other" as a language cannot be exported to orcid.org, since they are not accepted language codes.

Language is not a mandatory field, so I'd suggest to just skip the language field in export in the above cases.

dennmuel commented 5 years ago

Sorry, I was a bit too quick to fire here. The export currently doesn't have a lang field; we've added our own custom field in our config. If anyone needs it:

if( $eprint->get_value( "your_lang_field_here" ) ne ("mis" || "misc" || "other")) {
    $work->{"language-code"} = $eprint->get_value( "your_lang_field_here" );
}