Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The skosmos:hasMultiLingualProperty setting doesn't work as intended #1115

Closed
oddrunpauline opened this issue Jan 13, 2021 · 1 comment · Fixed by #1123
Closed

The skosmos:hasMultiLingualProperty setting doesn't work as intended #1115

oddrunpauline opened this issue Jan 13, 2021 · 1 comment · Fixed by #1123
Assignees
Labels
Milestone

Comments

@oddrunpauline
Copy link

oddrunpauline commented Jan 13, 2021

Sometimes it is useful to view information about a concept even though the information exists only in another language than the selected content language. Typical examples are skos:note fields, which may exist only in the default language, while terms are offered in several languages.
In SKOSMOS, this should be obtained by using the skosmos:hasMultiLingualProperty configuration setting

Example: The setting skosmos:hasMultiLingualProperty skos:definition, skos:scopeNote
should imply that all skos:definition and skos:scopeNote instances - in our case written in the language Norwegian bokmål (nb)- are shown on their parent concept page also whenever another language, e.g. English is the selected content language.
See also SKOSMOS user group conversation.

Currently, in spite of the setting above, definitions and scopeNotes are shown only when content language is nb (like the language of the notes)

@kouralex kouralex self-assigned this Feb 1, 2021
@kouralex kouralex added bug size-small max 2 hours labels Feb 1, 2021
@kouralex kouralex added this to the 2.9 milestone Feb 1, 2021
@kouralex
Copy link
Contributor

kouralex commented Feb 1, 2021

Thank you for the report.

I have identified the issue around the following lines of code and will soon come forward with a fix.

Skosmos/model/Concept.php

Lines 580 to 583 in 254c2c6

// only add literals when they match the content/hit language or have no language defined
if (isset($ret[$prop]) && ($literal->getLang() === $this->clang || $literal->getLang() === null)) {
$ret[$prop]->addValue($literal);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants