ncbo / goo

Graph Oriented Objects (GOO) for Ruby. A RDF/SPARQL based ORM.
http://ncbo.github.io/goo/
Other
15 stars 6 forks source link

Feature: Add portal languages preference #118

Closed syphax-bouazzouni closed 2 months ago

syphax-bouazzouni commented 2 years ago

Depend on PL

Goal

Define a preference list of languages to choose to print/show in the portal.

So if we set the languages configuration variable like so @@main_languages = ["en", "fr"], the API will show only English values and values with no language tags. And secondly, if no English or language-tagged values found we print french values. Else print all the values.

Agroportal and SIFRportal use case

  1. At SIFRportal we use this feature to give priority to French values ( using this configuration: @@main_languages = ["fr"] )
  2. At Agrportal we choose to have french as a secondary language ( with the fact that in most cases our ontologies are in English or French), so we have set the main_languages to ["en", "fr"] so that if at Agroportal we have an ontology that is only in French, Spanish and German we will print French values.

Related issues

alexskr commented 3 months ago

@mdorf please review this PR, we should merge it next

syphax-bouazzouni commented 2 months ago

replace with #150