Daniel-KM / Omeka-S-module-UniversalViewer

Module for Omeka S that adds the IIIF specifications in order to act like an IIPImage server, and the UniversalViewer, a unified online player for any file. It can display books, images, maps, audio, movies, pdf, 3D views, and anything else as long as the appropriate extensions are installed.
Other
7 stars 5 forks source link

Missing documentation on the best way to integrate UV in a custom theme #9

Open symac opened 5 years ago

symac commented 5 years ago

According to #2 there should now be no issue using French to display the UV but either there is still a bug, either I have not understood how to do.

What I am doing right now in my custom theme is:

echo $this->universalViewer($item, ["locales" => [['name' => 'fr-FR', 'label' => 'French']]])

But UV won't display in French. I have found that it is because of the $config += $options; that is used at https://github.com/Daniel-KM/Omeka-S-module-UniversalViewer/blob/master/src/View/Helper/UniversalViewer.php#L217

As $config['locales'] is already set just above this line, my $options are not taken into account. I have found this to work if I change $config += $options; to $config = array_merge($config, $options);.

But I am not sure if I need to do this because I have called correctly UV from my theme (then, some more documentation would be welcome) or if there is an actual code that my small change can fix (then feel free to integrate it).