Running this code on Windows
procedure TForm1.Button1Click(Sender: TObject);
const
// http://msdn.microsoft.com/de-de/goglobal/bb964664.aspx
LCID_EN = $0409;
LCID_DE = $0407;
LCID_FR = $040C;
LCID_HE = $040D;
var
s_EN, s_DE, s_FR, s_HE: String;
fs: TFormatSettings;
begin
// Month name in English
GetLocaleFormatSettings(LCID_EN, fs);
s_EN := SysToUTF8(FormatDateTime('mmmm', Date, fs));
// Month name in German
GetLocaleFormatSettings(LCID_DE, fs);
s_DE := SysToUTF8(FormatDateTime('mmmm', Date, fs));
// Month name in French
GetLocaleFormatSettings(LCID_FR, fs);
s_FR := SysToUTF8(FormatDateTime('mmmm', Date, fs));
// Month name in Hebrew
GetLocaleFormatSettings(LCID_HE, fs);
s_HE := SysToUTF8(FormatDateTime('mmmm', Date, fs));
ShowMessage(Format(
'This month is'#13 +
' %s (in English)'#13 +
' %s (in German)'#13 +
' %s (in French)'#13 +
' %s (in Hebrew)', [
s_EN, s_DE, s_FR, s_HE
]));
end;
displays a messagebox with the current month in several languages. The Hebrew name, however, does not show Hebrew characters.
Am I missing something, or is this a bug?