@Pako Porras , Thank you for reaching out. If the user(s) are all managed users (in cloud users), you can use PowerShell to set the preferred language for them.
Connect-AzureAD
#To set the preferred language
Set-AzureADUser -ObjectId {Object-Id of the user} -PreferredLanguage {language-code, for eg: **en** for **English**}
#To check the preferred language
Get-AzureADUser -SearchString {userPrincipalName} | select DisplayName, Preferredlanguage
Once you have got this set you can also use the Microsoft Graph API also to fetch this same information:
Note: You can get the list of supported language here: https://learn.microsoft.com/en-us/azure/active-directory/external-identities/user-flow-customize-language#supported-languages
In case the user is an On-Prem user, then you would have to first get the preferred language set in the on-prem domain and then get that synced. You can find mode details around this here: https://learn.microsoft.com/en-us/office365/troubleshoot/access-management/set-language-and-region
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.