I have a Dutch application that is localized to English by using Multilizer to
produce dll's. It workts fine and at startup of the program I could set my
language.
However, within this application I'm using custom components: within this
component I use the function
FormatDateTime(...)
to retrieve my weekday's as string: e.g. maandag, dinsdag etc. Because my
regional settings is 'dutch', the formatdatetime function will only return the
dutch day-names.
I've tried to force reading the application's setting bij using a local
TFormatSettings,
GetLocaleFormatSettings(LOCALE_system_DEFAULT, LFormatSettings);
and use this lFormatsettings variable within the function:
FormatDateTime('d mmmm yy', ADatum, LFormatsettings);
but all of these will return only the day-strings using my current regional
settings
Changing my regional settings from dutch to english will return the correct
strings, but I would like to switch between laguages within my application at
runtime and would like to be independent of the regional setting. Also I could
not force customers to change their regional settings to get the 'correct'
'Monday, Tuesday...'-strings etc.
If I change the abond getlocalformatsettings to
GetLocaleFormatSettings(1033, LFormatSettings); it will produce the English
version of the day-names.
How could I detect that my current application is started with the English
version? I could not use global variables because this component is developed
independent of my main application.
In other words: I would like to know the 'language' of my application and of my
pc. (regionale settings) and use this within my getLocaleformatsettings
function
Any ideas would be welcome.
regards
Andries
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware
protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
[Non-text portions of this message have been removed]