Ian Branch 127 Posted May 29, 2023 Hi Team, Win 11, D11.3.1. I am playing around with TFormatsettings and I am using this Emba code.. procedure Test; var str1, str2: string; FS: TFormatSettings; strResult, strFormat: TStringBuilder; begin strResult := TStringBuilder.Create; strFormat := TStringBuilder.Create; FS := TFormatSettings.Create('en-AU'); strFormat.AppendFormat('%s %s', [FS.LongDateFormat, FS.LongTimeFormat]); str1 := FormatDateTime(strFormat.ToString, Now()); strResult.AppendLine('1.'+str1); ShowMessage(FS.NormalizedLocaleName); strResult.AppendLine(FS.NormalizedLocaleName); //A second instance with a different locale (used for comparison) FS := TFormatSettings.Create('ro-RO'); strFormat.Clear; strFormat.AppendFormat('%s %s', [FS.LongDateFormat, FS.LongTimeFormat]); str2 := FormatDateTime(strFormat.ToString, Now()); strResult.AppendLine('2.'+str2); strResult.AppendLine(FS.NormalizedLocaleName); ShowMessage(strResult.ToString); // end; What should FS.NormalizedLocaleName return? Emba Help says a string but I am getting nothing back. Or maybe I am and it is blank. Not expected. Regards & TIA, Ian Share this post Link to post
Uwe Raabe 2057 Posted May 29, 2023 The xmldoc says: Quote This is a candidate to be removed or left to store the Locale that created the FormatSettings. Share this post Link to post
programmerdelphi2k 237 Posted May 29, 2023 @Ian Branch what propose this? can explains me? Share this post Link to post
Ian Branch 127 Posted May 29, 2023 p2k, I was just experimenting with Formatsettings and came across this that gave me nothing. Ian Share this post Link to post
programmerdelphi2k 237 Posted May 29, 2023 @Ian Branch What do you expected about it? I would like understand... Share this post Link to post
Ian Branch 127 Posted May 29, 2023 Hi p2k, I didn't really know what to expect, although I thought it might be, in my case, Australia. Share this post Link to post