feat(): new feature

This commit is contained in:
2026-01-29 15:59:08 +01:00
parent e9cca3daeb
commit c365b4fa6b
17 changed files with 617 additions and 83 deletions

View File

@@ -1,9 +1,28 @@
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { ApplicationConfig, LOCALE_ID, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';
import {provideHttpClient} from '@angular/common/http';
import { provideHttpClient } from '@angular/common/http';
const resolveLocale = () => {
if (typeof navigator === 'undefined') {
return 'de-CH';
}
const languages = navigator.languages ?? [];
if (navigator.language === 'it-CH' || languages.includes('it-CH')) {
return 'it-CH';
}
if (navigator.language === 'de-CH' || languages.includes('de-CH')) {
return 'de-CH';
}
return 'de-CH';
};
export const appConfig: ApplicationConfig = {
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), provideHttpClient()]
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
provideHttpClient(),
{ provide: LOCALE_ID, useFactory: resolveLocale }
]
};