Identifying users and site permissions when logged in If I'm logged in as a user in user Group A, how can I tell which site I am currently viewing?

I want to be able to create a multilingual site switcher. But my setup is complex.

I have Company A, User A is in  Group A

Company A Russian, User A is in Group A

Company A Hindi, User A is in Group A

I want to be able to let the user choose the Russian version of the current content. Same for Company B User B in Group B, etc. etc.
I built my site switcher like this:

https://www.thebasement.be/language-switcher-for-craft-3/

You will have to define an array for your site variables in the general.php for each environment:

'siteUrl' =&gt; array(
  'default' =&gt; 'http://yoururl/',
  'english' =&gt; 'http://yoururl/en/',
 ),


You can also extend the user with a language field and let him save his preferred language with a simple form like the user profile form from the Craft 3 docs.