TinCanJS icon indicating copy to clipboard operation
TinCanJS copied to clipboard

getLangDictionaryValue should take a list

Open brianjmiller opened this issue 12 years ago • 5 comments

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'.

brianjmiller avatar Dec 14 '12 14:12 brianjmiller

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.

bscSCORM avatar Dec 14 '12 14:12 bscSCORM

Also, the spec calls for the LRS to respect the accept-language header when pulling statements

bscSCORM avatar Dec 14 '12 14:12 bscSCORM

But didn't we end up saying "what's the point of leaving out any languages?" when statements are fetched?

ghost avatar Dec 14 '12 14:12 ghost

I don't recall that. If sparse = true in the statement query, language filtering isn't optional.

bscSCORM avatar Dec 14 '12 14:12 bscSCORM

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.)

brianjmiller avatar Dec 14 '12 15:12 brianjmiller