Daniel-KM / Omeka-S-module-Reference

Module for Omeka S to add glossary pages with the alphabetical indexes of specified classes and properties.
Other
3 stars 1 forks source link

Multilanguage facets #4

Closed JorisLambrechts closed 4 years ago

JorisLambrechts commented 6 years ago

Is it possible to retrieve the language of a value in the facet links?

We use one item pool for multiple sites (with different languages). In those items we add multiple values for a metadata field and set the language of each of those using the new language feature. At the moment there doesn't seem to be a way to determine the language of a value once it has become a facet link.

For instance I have one item with metadata field dc:language having 2 values:

On the search page this results in 2 facet links: -Dutch (1) -Nederlands (1)

In the context of a multilingual site we'd like to be able to hide the facet links that aren't set to 'en' on the English website for example.

For this example I'm using the mysql version of the facets, so no solr or other indexing.

Daniel-KM commented 6 years ago

There is no option for that currently. To be done...

Daniel-KM commented 6 years ago

And how to know which language is the current page or the language the user wants?

JorisLambrechts commented 6 years ago

Currently we just check the slugs of the site, in our case the slugs are simply 'en', 'fr', 'de', 'nl' ... since we couldn''t find a way to access the language setting of the site from the view (it's our first omeka-s project so I'm still finding my way).

In classic omeka we'd just make seperate items and item-types for each language, but we're hoping that that won't be necessary in omeka-s.

Daniel-KM commented 6 years ago

On most of the $this->reference() methods, there is a query arg. You can add it with [site_id' => $site->id()].

There will be probably more improvements later, but I need some clarification on https://github.com/omeka/omeka-s/issues/1293.

Daniel-KM commented 6 years ago

Or directly in the params of the block if you use the block way (prefered).

Daniel-KM commented 4 years ago

Thanks to close it, is included in last version (3.4.16).