TinCanJS
TinCanJS copied to clipboard
getLangDictionaryValue should take a list
This method should probably take a list of languages in preferred order for either multi-lingual users or for languages that are close enough to be usable such as 'en-US' and 'en-UK'.
We could leave it as a string, and have it parse accept-language format. Then, browser based consumers could potentially just read that preference out of the browser and pass it directly.
Also, the spec calls for the LRS to respect the accept-language header when pulling statements
But didn't we end up saying "what's the point of leaving out any languages?" when statements are fetched?
I don't recall that. If sparse = true in the statement query, language filtering isn't optional.
I like the accept-language idea as a pass to this method, not sure how hard the parsing is but can look into that. The second discussion probably begs a new issue on the various get calls adding a 'language' property to the configuration object for said calls that would populate the header. (I'll open a separate issue for it.)