diff --git a/projects/common/src/fm/effects/app-common.effects.ts b/projects/common/src/fm/effects/app-common.effects.ts index 087b423..b849f87 100644 --- a/projects/common/src/fm/effects/app-common.effects.ts +++ b/projects/common/src/fm/effects/app-common.effects.ts @@ -63,7 +63,10 @@ export class AppCommonEffects { ofType(appCommonActions.SWITCHLANGUAGE), switchMap((action) => { const a = action as appCommonActions.SwitchLanguage; - location.replace(`/${a.locale}/`); + if (location.pathname.includes(`/${this.locale}/`)) { + const newPath = location.pathname.replace(`/${this.locale}/`, `/${a.locale}/`); + location.replace(newPath); + } return of(undefined); })),{ dispatch:false});