website
website copied to clipboard
Investigate multilinguality for values we get from Wikidata.
Can we use the qLabel library to get multilingual values in the interface (similar to how the Wikimania menu works? This could be a step towards full multilinguality.
Our interviews show that it has been confusing for Swedish people when asked to search for a specific institution in Swedish (i.e. they don't really know the name of it in English even if they are very good English speakers).
qLabel is unable to handle more than 50 labels so it fails to be usable in our lists, however, we might want to create our own version of it anyway. https://github.com/googleknowledge/qlabel/blob/d5b69735f81e3c4c2245e4627237d7bd83a760cc/src/jquery.qlabel.js#L113
The idea to be able to switch between English and the local language seems tricky as several countries have more than one "local" language. One option could be to have a more extensive language selector but most of its options would not be useful and we would require more interaction to make the switch. Ideas welcome. :bulb:
Example: "Ministry of Foreign Affairs of Norway" is named "Utenriksdepartementet" in Norwegian Bokmål and "Utanriksdepartementet" in Norwegian Nynorsk.
The language selector allows for selecting a few languages to highlight (as can be seen in the top left on this implementation). Perhaps it would be possible to define this per country page? Now, it wouldn't help as much on the topic pages, but it is a start.
We could configure languages per country with a comma-separated string in the country configuration: https://github.com/govdirectory/website/blob/a499d53a1fe5cf2a2037ac1d44301075d231b8fd/queries/countries.rq#L13-L15
We could maybe also just use such a comma-separated to rank local languages.
For example, "nb,nn" would mean that when possible the local language should be considered Norwegian Bokmål but fall back to Norwegian Nynorsk. This would also allow us to have a simple toggle instead of something ULS-like.
I think that would be a great start. I guess it would make most sense to put this toggle near the table, right?
Yeah, I think we could maybe bundle things like table-search/sorting and language switch in a table toolbar/menu?