You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if similar feature request does not exist
[ ] support request => Suggested place for help and support is [stackoverflow](https://stackoverflow.com/), search for similar question before posting
Description
I have an application with two languages TR/EN
The app get browser settings for Language Selection by default on Load.
I have a lazyload with children componentes
I get translate url parameter correctly
We go to the children component level
We change language selector from en --> tr ( which is not the browser settings language )
We reload the page
We are redirect to Home Component
🔬 Components Used
app.component.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule, HttpClient } from '@angular/common/http';
//* Translate
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { MultiTranslateHttpLoader } from "ngx-translate-multi-http-loader";
import { RouterModule } from '@angular/router';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HomeComponent } from './core/site/home/home.component';
import { NavigationComponent } from './_layout/navigation/navigation.component';
import { FooterComponent } from './_layout/footer/footer.component';
// AoT requires an exported function for factories
export function HttpLoaderFactory(http: HttpClient) {
return new MultiTranslateHttpLoader(http, [
{ prefix: "./assets/i18n/_routers/", suffix: ".json" },
{ prefix: "./assets/i18n/footer/", suffix: ".json" },
{ prefix: "./assets/i18n/navigation/", suffix: ".json" },
{ prefix: "./assets/i18n/home/", suffix: ".json" }
]);
}
@NgModule({
declarations: [
AppComponent,
HomeComponent,
NavigationComponent,
FooterComponent
],
imports: [
BrowserModule,
RouterModule,
ReactiveFormsModule,
BrowserAnimationsModule,
HttpClientModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: (HttpLoaderFactory),
deps: [HttpClient]
},
isolate: true
}),
AppRoutingModule
],
exports: [],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Anything else relevant?
It seems to me that any router on the page re-direct to homepage when languageChange is different to the browser language settings and we reload the page
Has anyone experience similar issue?
The text was updated successfully, but these errors were encountered:
I'm submitting a ... (check one with "x")
Description
I have an application with two languages TR/EN
🔬 Components Used
app.component.ts
app-routing.ts
app.component.ts ( select language by default according with browser settings )
satic-routing.ts
static.module.ts
footer.ts ( changeLanguage method )
static.component.ts ( any component level )
🌍 Your Environment
Angular Version:
Localize Router Version:
Anything else relevant?
It seems to me that any router on the page re-direct to homepage when languageChange is different to the browser language settings and we reload the page
Has anyone experience similar issue?
The text was updated successfully, but these errors were encountered: