Hi Asha,
This is possible by logging out the user using a Java action and a custom login page.
First, create a Java action that logs out the current user session.
Call this Java action in a microflow and connect it to the logout button of your application. In this microflow, before logging out the user with the Java action, retrieves the user's preferred language.
Based on the language, you can display the respective login page.
Note: The above logic will work when a user tries to log in immediately after signing out.
To allow users to sign in later based on their preferred language, you can modify your login page slightly.
For example, you could create a sign-in page that asks users to enter their email address. When the user types in their email, you can retrieve the associated account and access their preferred language. Then, you can reload the login page to display it in the user's preferred language.