[windev] Haitian Creole and LocaleID
truckleaj-windev@yahoo.co.uk
truckleaj-windev at yahoo.co.uk
Tue Jul 21 15:57:07 GMT 2009
MFC Dialog VS2005
Hi
Someone approached me about supporting Haitian Creole and a language in one=
of my applications. After some research we decided it was not required to =
actually translate the application itself and that it could remain in Engli=
sh. Only certain aspects of the program needed to be done and it has been a=
greed to use an INI file for this purpose.
However, before I begin to prepare this INI file for translation I wanted t=
o look at the possibility of displaying dates correctly in the program. I a=
sked the translator for the days of the week and months of the year:
Days of the week (starting with =
Monday):
=
=
Lendi
Madi
M=E8kredi
Jedi
Vandredi
Samdi
Dimanch
=
=
=
Months of the year:
=
Janvye
Fevrye
Mas
Avril
Me
Jen
Jiy=E8
Out
Septanm
Okt=F2b
NovanmDesanm
I have tried to set the locale so that these will be returned but it does n=
ot seem to work. I use dates in two ways in my program. Firstly, I use the =
GetLocaleInfo method with the right locale ID to build combo drop lists of =
days of the week. I realise that I can override that behavior and simply us=
e translations from the INI file. But can it be done with GetLocaleInfo?
Secondly, I use the COleDateTime::Format method to generate date strings us=
ing custom format strings. Before the call is made I set the locale thus:
CString strLang[NUM_LANGUAGES] =3D =
{
_T("eng"), _T("deu"), _T("esp"), _T("ita"),
_T("plk"), _T("fra"), _T("ptb"), _T("nld"),
_T("sve"), _T("slv"), _T("csy"), _T("fin"),
_T("dan"), _T("ukr"), _T("rus"), _T("fpo") // Add more languages he=
re
};
_tsetlocale(LC_ALL, strLang[m_eLanguage-LANGUAGE_ENGLISH]);
It is not clear to me if there is a code to use for the language in questio=
n. Thus I am not sure how to get around this issue because it will be hard =
to format a customized date string, unless I do some manually Find/Replace =
of known values. Worst case scenrio is the days of the week and months of =
the year in full or abbreviated form I guess.
Anyway, I wanted to ask you for advice about this. Appreciate any comments =
so that I do this the most elegant way.
Thank you.
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.windev.org/pipermail/windev/attachments/20090721/74074e4f=
/attachment.htm
More information about the Windev
mailing list