How to get locale?
-
How can I get the user's locale. If possible, can I get it on the client side? If not, what is the user field?
-
@pitaj on the client side, there is a global variable
config
, there are some useful things there
config.userLang
is what you asked for.
-
As for server-side, you'll want
language
, I believe, from inside the user set. This is what we use:user.settings.language || meta.config.defaultLang || 'en_GB'
Suggested Topics
Copyright © 2018 NodeBB | Contributors