skohub-io / skohub-editor

Apache License 2.0
5 stars 4 forks source link

Add (possibility to select) language information #32

Open acka47 opened 4 years ago

acka47 commented 4 years ago

It would be nice to add the language of the metadata to the JSON-LD like this:

{
   "@context":[
      "https://dini-ag-kim.github.io/lrmi-profile/draft/schemas/context.jsonld",
      {
         "@language":"de"
      }
   ],
   "name":"Example Resource",
   "...":"..."
}

For supporting this, it might make sense to put the context URL in an array by default.

acka47 commented 4 years ago

In the editor UI, it would be nice to have a dropdown at the top of the web form where the language can be selected.

acka47 commented 3 years ago

With implementing https://github.com/dini-ag-kim/lrmi-profile/issues/18 the default JSON Schema expects a default language in the context, e.g. {"@language": "de"}.

In the editor, this could be added with a dropdown right over the web form, where you can choose a language. In the JSON, this would then set the default language with the respective language code in the @context.

The relevant part of the JSON schema is https://github.com/dini-ag-kim/lrmi-profile/blob/898c01232dcc39db2d56dea8f3f9e18770c399e8/draft/schemas/schema.json#L12-L35

literarymachine commented 3 years ago

Under the hood, this is strongly related to #54.