You are not logged in.
Pages: 1
Hi ab
I'm using mormot on an existing project but to call TimeToStr (Now) is returning with AM / PM (ex. "9:02:45 AM"). If I remove mormot project files the same function returns the time correctly (ex. "09:02:45").
In my Windows the default time format is HH: mm: ss (Portuguese Brazil).
I need the mormot work with the same format of my language in Windows.
Offline
Weird.
I did not found any place in our source code where the global FormatSettings variable is changed by the framework...
Could you try to isolate which unit is doing the change?
Create a new project, then add units one by one: SynCommons, mORMot, mORMotSQLite3, mORMotDB, mORMotUI, mORMoti18n...
I guess that mORMoti18n is changing the current SysLocale.
But this is on purpose IMHO.
Try to define NOI18N conditional for your project.
Offline
In mORMoti18n (line 1247) always puts as lngEnglish, even if I set i18nLanguageToRegistry(lngPortuguese).
I'm using the mORMot_and_Open_Source_friends_2015-02-16_211520_112f15efcb sources
Last edited by sergioschel (2015-02-21 12:33:03)
Offline
Yes, it expects the pt.msg file to be available...
But I understand this is pretty confusing.
I've added a new aForceEnglishIfNoMsgFile optional parameter for SetCurrentLanguage().
And change the default behavior so that any missing .msg file won't change the current locale.
See http://synopse.info/fossil/info/27aedaa271
Offline
Great ab
Thanks for the help, is now working.
Offline
great, but not all look fine.
original code
// 2. handle missing .msg file
LanguageForLanguageFile := aLanguage;
if LanguageForLanguageFile<>lngEnglish then
if not FileExists(TLanguageFile.FileName(LanguageForLanguageFile)) then begin
if aForceEnglishIfNoMsgFile then
if CurrentLanguage.Index=lngEnglish then
exit else
aLanguage := lngEnglish;
LanguageForLanguageFile := lngEnglish; // no .msg -> no translation
end;
dates look bad, not default view dd.mm.yyyy
if change
// 2. handle missing .msg file
LanguageForLanguageFile := aLanguage;
if LanguageForLanguageFile<>lngEnglish then
if not FileExists(TLanguageFile.FileName(LanguageForLanguageFile)) then begin
if aForceEnglishIfNoMsgFile then
if CurrentLanguage.Index=lngEnglish then
exit else
aLanguage := lngEnglish;
LanguageForLanguageFile := lngRussian; // CHANGED TO lngRussian
end;
dates look fine
Do not know why such a difference
Last edited by proto (2015-03-06 07:58:54)
Offline
Pages: 1