What I want to do is described here
It allows me to have urls like domain.com/en/contacts
But additionally I want the url to have a language code when user navigates to the main page of the webpage by domain.com
-> domain.com/en/
To do so I need to detect user language first and then add {locale} params to the url. Is there a good solution for it?