Altinn / Altinn/app-frontend-react
Access anonymous user chosen language in a stateless app
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description
When a anonymous user has picked his/hers language from altinn.no. Example:
https://www.altinn.no/starte-og-drive/starte/for-oppstart/oppstartsveileder-for-enkeltpersonforetak/
If a user picks for example english as his/hers preferred language, the URL will change to the following:
https://www.altinn.no/en/start-and-run-business/planning-starting/before-start-up/startup-tutorial-for-sole-proprietorships/
In the same page there is an URL to an Altinn 3 app. Inside that app, there is no current functionality to get hold of the users choice of language except perhaps to check the URL, however that is not an optimal solution.
It would be great if there was an easy way to access the language preferred by the current user, anonymous or not.
### Additional Information
A query parameter could possibly be a solution, however in a stateless app, Im guessing it doesnt save anything and one would need to set the value from query param in session or something. Making it a possibly non-stateless app.
Contributor guide
Research direction
Begin by tracing how the localized altinn.no URLs reach the Altinn 3 app and how the frontend currently receives user context for anonymous and authenticated users. Review the proposed query-parameter and session approaches before choosing a direction. Done means the app has a defined, documented way to read the selected language without relying on an unintended stateful session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, internationalization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100