opencast / opencast-editor

Web-based video editor for Opencast
https://editor.opencast.org
Apache License 2.0
56 stars 43 forks source link

Add "auto" option to language selector #1137

Open Arnei opened 1 year ago

Arnei commented 1 year ago

The redesign introduced a language selector. It would be great to be able to set it to "auto", akin to the theme selector.

More context: https://github.com/opencast/opencast-editor/pull/1079#issuecomment-1695757268

lkiesow commented 1 year ago

Unfortunately, it seems the translation library we use (react-18next) does not support an auto option out of the box. We certainly could work around that and make our own auto mode somehow, but it seems to me like that would take more time than I am willing to spent on it in this PR. Best left for another time.

If I remember correctly, it does support that to some extent: It already selects the language automatically, if none is stored in the local storage. So maybe just store to auto-mode separately and make sure to remove the stored i18m language before loading i18m.