Change language for addon

I like to be able to switch the language specific settings in lang and _formattingOpt each time the user selects a different language for https://github.com/martinic/ember-cli-markdown-editor/blob/master/addon/components/markdown-editor.js

Is there a best practice for this and is there an addon that is already doing something similar ?

Edit: Found the way I think here