I am trying to work with a basic array of languages and a switch function, but I am having trouble using the forEach method on the cases. It would be really helpful as there are numerous languages in the world! ;)
public languages = ["en", "de"];
public selectLanguage: string = "en";
changeLanguageSelect() {
switch (this.selectLanguage) {
case "en":
this.translate.use('en');
break;
case "de":
this.translate.use('de');
break;
}
}
I don't have much else to add. Essentially, I want to iterate through the languages
array in a similar way.