mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-24 13:40:57 +03:00
Updated angular material to v9
Added further translation support
This commit is contained in:
19
src/main.ts
19
src/main.ts
@@ -1,12 +1,29 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import 'hammerjs';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
import { loadTranslations } from '@angular/localize';
|
||||
import { getTranslations } from '@soluling/angular';
|
||||
import '@angular/localize/init';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
// const locale = localStorage.getItem('locale');
|
||||
|
||||
getTranslations('assets/i18n', false, true, true, 'en', null, 'locale').then(translations => {
|
||||
if (translations) {
|
||||
loadTranslations(translations);
|
||||
}
|
||||
|
||||
import('./app/app.module').then(module =>
|
||||
{
|
||||
platformBrowserDynamic()
|
||||
.bootstrapModule(module.AppModule)
|
||||
.catch(err => console.error(err));
|
||||
});
|
||||
});
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
|
||||
Reference in New Issue
Block a user