Der schöne Günther 316 Posted June 21, 2020 I would like to get the format settings for a language, EN-GB for example. I know this is as easy as myFormatSettings := TFormatSettings.Create('EN-GB') My problem: Assuming The current user session is already using this very EN-GB locale And has adjusted the local format settings (for example, by using Windows settings) myFormatSettings will contain the users custom values, not the "original" ones for EN-GB Example: Assert( TFormatSettings.Create('EN-GB').ShortDateFormat = 'dd/MM/yyyy' ) will fail if I have set the computers local format settings for something else. I have tried TFormatSettings.Create(..) where it takes an LCID instead of a string, but all GetUserDefaultLCID(), GetSystemDefaultLCID() or MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK) return the same LCID number and therefore make no difference when trying to extract the short date format from Windows. Is there any way I could still get the "true" short date format that has not been customized? Share this post Link to post
Uwe Raabe 2058 Posted June 21, 2020 Seems that LOCAL_NOUSEROVERRIDE is your friend here. 1 1 Share this post Link to post
Der schöne Günther 316 Posted June 21, 2020 Yes, that's exactly what I was looking for. Works like a charm 👍 Share this post Link to post
Fr0sT.Brutal 900 Posted July 24, 2020 (edited) Quote LOCAL_NOUSEROVERRIDE Side note: having a choice, I'd stay away from such a software unless there would be REALLY strong benefits in using it. Then I'd use it but curse its developer regularily Edited July 24, 2020 by Fr0sT.Brutal Share this post Link to post