I have the following code snippet.
import {English as en} from 'languages/en.js'
import {Spanish as es} from 'languages/es.js'
console.log(this.lang) // es
I'm trying to call the corresponding imported module using the this.lang
string. But not sure how I can call that module.
window[this.lang]
wouldn't work.
Any suggestions?