Simplify changing language
Summary of the new feature/enhancement
We can simplify the language selection by:
- change our changeLanguage component so that
- it stores our current route to session storage
- when invoked, changing the language and redirecting to the previous route by parsing the route stored in session storage to
/
.
- add it to app.routing.ts file with the paths:
/lang/:id
whereid
can be one of the languages inconfigurationService.i18n.locales
Justify the new feature/enhancement
This is more maintainable solution than our current one and will need less resources on the client as it will not have to calculate and render the languages whenever a router event is triggered