function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SUMAN KUMARI 70SUMAN KUMARI 70 

How to open login page in Mobile app in corresponding language

I have a Mobile application that uses REST Services to provide the functionality. Mobile application is also multi-lingual and depends on the current device language. They have a Sign In button using which they do an OAUTH  and  Login page (specific to app) opens up. How can I send a language parameter in the OAUTH URL and then read that parameter to open the Login Page in the corresponding language (English/Spanish).
AnudeepAnudeep (Salesforce Developers) 
Hi Suman,

What you are trying to achieve is unfortunately not possible based on my knowledge

As per the documentation, the standard login pages for both Mobile SDK and Salesforce for Android and iOS are pre-authentication (meaning Salesforce does not know who you are), any org-specific profile-based settings such as language will not be recognized. The OAuth APIs do not support or honor query string input parameters to authentication endpoints and thus Mobile SDK and Salesforce for Android and iOS also share that limitation.

Suppose if you have a login url like this
 
/services/oauth2/authorize?response_type=code&client_id=3MVG9w8uXui2aB_racF4e7Q21BdrOyeWodnE.ZUUBVItShV5RsAvkf1Vq9GOSDH.XA9ekys1Wo50OZ2qpMbCR&redirect_uri=https%3a%2f%2fhiab.local%2fsignin-salesforce&display=page&immediate=False&language=fr&scope=openid

Language parameter will be dropped at "RemoteAccessAuthorizationPage" and becomes English

It is the recommendation of Salesforce that users be encouraged to switch their device to the language of their choice in order to effectively render the standard login page in a preferred language/locale. This is the default behavior

If you find this information helpful, please mark this answer as Best. It may help others in the community

Anudeep