MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

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 and getTranslations would let the system know where the configuration file is. But I have no luck getting the language setting from config.js.

    Thanks for the help.



  • Sorry just find that config.language solves the problem


  • Module Developer

    sure 😉
    config is the entire config file, so you can read it with for example console.log(config)


Log in to reply