This gets stored in localStorage of the browser which is not
ideal. This is because we load language catalogs before we
load user preferences - so if this was stored in the runtime,
the editor wouldn't know the user's preference until it was
too late to apply it.
This is likely good enough for now - may need to do something
more convoluted later on.
Fixes#2028
The i18n library will, be default, return a string containing
an error message about the key resolving to an object. We cannot
distinguish that string from others to handle ourselves.
The `returnObjectTrees` option will cause it to return the object
rather than error. We can then test for that and return the original
key if the object is returned - which is the desired result.