Q:
Is it possible to automatically detect the user's language so that the WebViewer UI will be rendered in that language?
A:
Yes, you'll need to find the file lib/html5/ControlUtils.js and update the i18nInit function so that it passes true to the getI18nOptions function:
i18n.init(exports.ControlUtils.getI18nOptions(true), function() {