Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Fixed retrieval of language code/display name
Browse files Browse the repository at this point in the history
  • Loading branch information
DelphiWorlds committed May 11, 2020
1 parent 90bef48 commit 0af6adb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/DW.OSDevice.Win.pas
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ class function TPlatformOSDevice.GetCurrentLocaleInfo: TLocaleInfo;
Result.LanguageCode := 'en';
LLength := GetLocaleInfo(GetUserDefaultLCID, LOCALE_SLANGUAGE, LBuffer, Length(LBuffer));
if LLength > 0 then
SetString(Result.LanguageCode, LBuffer, LLength - 1)
SetString(Result.LanguageDisplayName, LBuffer, LLength - 1)
else
Result.LanguageCode := '';
Result.LanguageDisplayName := '';
LLength := GetLocaleInfo(GetUserDefaultLCID, LOCALE_SISO3166CTRYNAME, LBuffer, Length(LBuffer));
if LLength > 0 then
SetString(Result.CountryCode, LBuffer, LLength - 1)
Expand Down

0 comments on commit 0af6adb

Please sign in to comment.