I have set the user’s language to “German”, so I would expect the call to return de, or at the least default_language if there’s no “lang” setting for the passed user.
You can always poke around in the database to see what actual data the API you are using is processing. For example the config value you asked for with the call above is in the preferences table. Note that the default value in your call is only used if there is no matching row at all in the table - it is not used if there is a row and the value in it is empty.
So if I get empty back, I should (probably) force my preferred “default value” I guess?
I’ve checked the oc_preferences table, and for the given user, I have:
core lang fi
core locale sv_SE
And the NC UI does show things in Finnish (fi). But I still get en back in the lang call. I get the correct value back for the locale call. And seeing as how this is how the internals of NC seems to be doing it, I must have forgotten something or misread something. I just can’t quite figure out what.
Yeah, except for some reason, I must have been using the wrong call to get the userName/userId since I’m getting the admin of the instance, and not the user for the current session.
Yeah, I get that part, but thank you for checking. I’m doing this to (potentially) load different documents based on the user’s language setting (and if there is a language specific document).