MagicMirror² v2.4.1 is available! For more information about this release, check out this topic.
Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!

Forcing language translations in module

  • Module Developer

    How do I go about forcing translations in a module?

    I want my configuration option to overwrite the main config language setting, how do I do that in the code? I have included translation json files in the module and include them using

    	getTranslations: function() {
    		return {
    	   	        en: "translations/en.json",
    			sv: "translations/sv.json"

    and then use this.translate('word')

    I guess this is really simple, but I’m lost