Read the statement by Michael Teeuw here.
How to obtain the current language setting?
-
I am developing a module that need to send the translation via the API. (e.g. /api?lang=en). In order for this I need to obtain the translation from the configuration and send it over.
this.translatewould translate the word andgetTranslationswould let the system know where the configuration file is. But I have no luck getting the language setting fromconfig.js.Thanks for the help.
-
Sorry just find that
config.languagesolves the problem -
sure ;)
configis the entire config file, so you can read it with for exampleconsole.log(config)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login