DSpace / dspace-angular

DSpace User Interface built on Angular.io
https://wiki.lyrasis.org/display/DSDOC8x/
BSD 3-Clause "New" or "Revised" License
131 stars 430 forks source link

[DS-4372] Multilanguage support for Form-value-pairs and Controlled Vocabularies #1304

Open dspace-bot opened 5 years ago

dspace-bot commented 5 years ago

Imported from JIRA [DS-4372] created by julius.gruber

Use case
Please see the attached picture for a graphical representation of the use case.

REST API changes

Currently a REST API call to get the entries for a controlled vocabulary or a form-value-pair look like this:

Get entries for a controlled vocabulary: host/api/integration/authorities/srsc/entries?query=&metadata=dc.subject&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100

Get entries for a form-value-pair: host/api/integration/authorities/common_types/entries?query=&metadata=dc.type&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100

In order to get language-specific vocabularies or form-value-Pairs the Angular client should use the Accept-Language header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language).

A REST API call to fetch language-specific form-value-pairs or controlled vocabularies may look like this:
REST API calls to get a controlled vocabulary in German: host/api/integration/authorities/srsc/entries?query=&metadata=dc.subject&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100&Accept-Language=de
REST API call to get a form-value-pair in German: host/api/integration/authorities/common_types/entries?query=&metadata=dc.type&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100&Accept-Language=de

First (naïve) approach on what has to be changed at the backend:
Add a new language attribute to form-value-pairs and controlled vocabularies. Allow two or more form-value-pairs or controlled vocabularies to have the same name attribute. If two or more form-value-pairs or controlled vocabulary have the same name attribute make sure they have different language attributes.

dspace-bot commented 4 years ago

tdonohue said:

Flagging as "More Details Needed", simply because it requires more discussion before this feature can be scheduled for development/release.

dspace-bot commented 5 years ago

Depends on: DS-4466