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


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.