Add ESLint integration and Angular linting support
Configured ESLint for the project with Angular and TypeScript support. Added angular-eslint dependencies, updated angular.json to include linting, and created eslint.config.js for lint rules. Updated package.json and package-lock.json with new dev dependencies.
This commit is contained in:
@@ -19,14 +19,14 @@ export class LanguageService {
|
||||
use(l: Lang) {
|
||||
this.lang.set(l);
|
||||
this.translate.use(l);
|
||||
try { localStorage.setItem(LocalStoreConstants.LANGUAGE_KEY, l); } catch {}
|
||||
try { localStorage.setItem(LocalStoreConstants.LANGUAGE_KEY, l); } catch (e) { void e; }
|
||||
}
|
||||
|
||||
private getInitial(): Lang {
|
||||
try {
|
||||
const stored = localStorage.getItem(LocalStoreConstants.LANGUAGE_KEY) as Lang | null;
|
||||
if (stored === 'de' || stored === 'en') return stored;
|
||||
} catch {}
|
||||
} catch (e) { void e; }
|
||||
const browser = (navigator.language || 'en').toLowerCase();
|
||||
return browser.startsWith('de') ? 'de' : 'en';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user