docs: add JSDoc comments to LanguageService

This commit is contained in:
Chneemann 2024-11-14 04:43:51 +01:00
parent bf88b88b99
commit 44add1ee3d

View file

@ -11,6 +11,11 @@ export class LanguageService {
this.translate.setDefaultLang(this.currentLang); this.translate.setDefaultLang(this.currentLang);
} }
/**
* Switches the language for the application.
*
* @param lang A string denoting the language to switch to, either 'en' or 'de'.
*/
switchLanguage(lang: string) { switchLanguage(lang: string) {
if (lang === 'en') { if (lang === 'en') {
this.currentLang = 'en'; this.currentLang = 'en';