With TMSFNCCloudPack, texts of the login screens of the clouds (Dropbox, Google Drive, OneDrive) are in English while my application and my mobile are in French.
I tried setting the Language property to glFrench without any effect.
The cloud login texts and the successful login page remain in English.
The authentication page language can be set with the Authentication.Locale property (if it is supported by the service).
This behaves a little different depending on which service you are using.
DropBox:
Sets the language based on browser settings. Unfortunately it's not possible to manually set the langauge.
Google Drive
Uses IETF language tags. For French you can use the value 'fr'.
Example: TMSFNCCloudGoogleDrive1.Authentication.Locale := 'fr';
OneDrive
Uses LCID values. For French you can use the value '1036'. TMSFNCCloudMicrosoftOneDrive1.Authentication.Locale := '1036'; Note: There is an issue with the OneDrive Locale handling, this will be fixed with the next TMS FNC Cloud Pack release.
The result page is handled internally and uses resource strings defined in FMX.TMSFNCCloudOAuth.pas file:
resourcestring
sExternalBrowserAuthorizationOK = '<div class="text2">Application successfully authorized</div>You can close this browser window';
sExternalBrowserAuthorizationFailed = '<div class="text2">Application authorization failed</div><br/>Please try again.';
It is a pity that the system does not use the phone's language. I didn't have this problem with TMSFMXCloudPack, which displayed the login pages of the clouds in the terminal's language...
Lastly, for the final result login page result (127.0.0.1...), it would be desirable to make the tranlastion configurable at the component level or to set them as global variables. Uing ResourceString in the component's code cancels the translation made with every installation of a new version of the components.
Please note that the language of the login and authentication pages in the browser are handled by the service providers.
We'll investigate to improve localization options in a future version.
You can do the translation of the result page on component level with the OnGetAuthorizationPageHTML event.
public
procedure TMSFNCCloudStorageGetAuthorizationPageHTML(Sender: TObject;
const ASuccess: Boolean; var AHTML: string);
end;
procedure TForm1.SelectService;
begin
TMSFNCCloudStorageServices1.Storage.OnGetAuthorizationPageHTML := TMSFNCCloudStorageGetAuthorizationPageHTML;
end;
procedure TForm1.TMSFNCCloudStorageGetAuthorizationPageHTML(Sender: TObject;
const ASuccess: Boolean; var AHTML: string);
begin
AHTML := AHTML.Replace('Application successfully authorized', 'localization text 1');
AHTML := AHTML.Replace('You can close this browser window', 'localization text 2');
end;