A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
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.translate
would translate the word andgetTranslations
would 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.language
solves the problem -
sure ;)
config
is the entire config file, so you can read it with for exampleconsole.log(config)