Page 9 of 10
Re: HMG 3.1.3 (Test)
Posted: Tue May 28, 2013 5:15 am
by srvet_claudio
srvet_claudio wrote:
_HMG_SYSDATA [211] was always empty in previous versions of HMG, but I fix it no problem.
I added in h_init.prg:
Function
HMG_GetLanguage ()
Return _HMG_SYSDATA [ 211 ]
*------------------------------------------------------------------------------*
Procedure InitMessages (cSetLang)
*------------------------------------------------------------------------------*
STATIC cLang := "EN"
IF cSetLang <> NIL
cLang := cSetLang
ENDIF
_HMG_SYSDATA [ 211 ] := cLang
................
Re: HMG 3.1.3 (Test)
Posted: Tue May 28, 2013 10:10 am
by Abdul Haris
Hi Rathi and Dr. Claudio,
Thanks for the bug fixes and New Release
Regards,
Haris
HMG 3.1.3 (Test)
Posted: Tue May 28, 2013 10:23 am
by Pablo César
srvet_claudio wrote:srvet_claudio wrote:
_HMG_SYSDATA [211] was always empty in previous versions of HMG, but I fix it no problem.
I added in h_init.prg:
Function
HMG_GetLanguage ()
Return _HMG_SYSDATA [ 211 ]
*------------------------------------------------------------------------------*
Procedure InitMessages (cSetLang)
*------------------------------------------------------------------------------*
STATIC cLang := "EN"
IF cSetLang <> NIL
cLang := cSetLang
ENDIF
_HMG_SYSDATA [ 211 ] := cLang
................
But the real problem is when this cLang is empty not NIL. It should has some like this:
Code: Select all
If Empty(cLang)
cLang := hb_UserLang()
Endif
_HMG_SYSDATA [ 211 ] := cLang
The problem is hb_UserLang() return "
pt-BR" for portuguese and not as "
pt" only defined. So probably we need to compare cLang as
SubString(cLang,1,2)="pt" then it would work fine for brazilian portuguese and also for portuguese from Portugal at source files
h_init.prg and
h_controlmisc.prg
Re: HMG 3.1.3 (Test)
Posted: Tue May 28, 2013 12:28 pm
by srvet_claudio
Pablo César wrote:
The problem is hb_UserLang() return "pt-BR" for portuguese and not as "pt" only defined. So probably we need to compare cLang as SubString(cLang,1,2)="pt" then it would work fine for brazilian portuguese and also for portuguese from Portugal at source files h_init.prg and h_controlmisc.prg
Hi Pablo,
are two different things:
- hb_UserLang() --> displays HARBOUR messages in the specified language
- InitMessages (cSetLang) --> displays HMG messages in the specified language
the latter is initiated in HMG by the command: SET LANGUAGE TO xxx
For default is: InitMessages ("EN")
Best regards,
Claudio.
HMG 3.1.3 (Test)
Posted: Tue May 28, 2013 12:33 pm
by Pablo César
srvet_claudio wrote:Pablo César wrote:
The problem is hb_UserLang() return "pt-BR" for portuguese and not as "pt" only defined. So probably we need to compare cLang as SubString(cLang,1,2)="pt" then it would work fine for brazilian portuguese and also for portuguese from Portugal at source files h_init.prg and h_controlmisc.prg
Hi Pablo,
are two different things:
- hb_UserLang() --> displays HARBOUR messages in the specified language
- InitMessages (cSetLang) --> displays HMG messages in the specified language
the latter is initiated in HMG by the command: SET LANGUAGE TO xxx
For default is: InitMessages ("EN")
Best regards,
Claudio.
Ok, Claudio but how we can get this
cSetLang when is always EMPTY or always EN (even not been English) ? Any suggestion ?
HMG 3.1.3 (Test)
Posted: Tue May 28, 2013 1:29 pm
by Pablo César
I have posted a different way to find Language ID, look at:
http://hmgforum.com/viewtopic.php?p=26952#p26952 probably could help for _HMG_SYSDATA [211] (
_HMG_LANG_ID).
Re: HMG 3.1.3 (Test)
Posted: Tue May 28, 2013 2:01 pm
by srvet_claudio
Pablo César wrote:Ok, Claudio but how we can get this cSetLang when is always EMPTY or always EN (even not been English) ? Any suggestion ?
Add it is in bold (h_init.prg) and rebuild lib.
srvet_claudio wrote:
Function HMG_GetLanguage ()
Return _HMG_SYSDATA [ 211 ]
*------------------------------------------------------------------------------*
Procedure InitMessages (cSetLang)
*------------------------------------------------------------------------------*
STATIC cLang := "EN"
IF cSetLang <> NIL
cLang := cSetLang
ENDIF
_HMG_SYSDATA [ 211 ] := cLang
HMG 3.1.3 (Test)
Posted: Tue May 28, 2013 2:12 pm
by Pablo César
Dear Claudio, I've done what you indicated. But my _HMG_SYSDATA[211] is still "EN" not "PT".
It for this reason I said "
how we can get this cSetLang when is always EMPTY or always EN (even not been English) ?".
Just to take the duly attribution of _HMG_SYSDATA[211].
Re: HMG 3.1.3 (Test)
Posted: Wed May 29, 2013 2:57 am
by Pablo César
Pablo César wrote:Dear Claudio, I've done what you indicated. But my _HMG_SYSDATA[211] is still "EN" not "PT".
It for this reason I said "
how we can get this cSetLang when is always EMPTY or always EN (even not been English) ?".
Just to take the duly attribution of _HMG_SYSDATA[211].
After Dr. Soto explainations, I could say Language suport inside HMG, should be review. I fully agree with Dr. Soto to untie languages strings inside HMG and start using the language file directly (like as IDE and STRU app). But this is a hard job and we will need a lot of help for translation of local languages just to assure all languages envolved are perfectly translated.
I have found problems when a I set this in my codes:
SET LANGUAGE TO PORTUGUESE
I have checked sintaxe of this in C:\hmg.3.1.3\INCLUDE\i_lang.ch and corrected from this:
#translate SET LANGUAGE TO PORTUGUESE => _HMG_SYSDATA \[ 211 \] := ' ' ; REQUEST HB_LANG_PT ; HB_LANGSELECT(hb_UserLang(), "PT850") ; InitMessages("PT")
to correct to this:
#translate SET LANGUAGE TO PORTUGUESE => _HMG_SYSDATA \[ 211 \] := ' ' ; REQUEST HB_LANG_PT ; HB_LANGSELECT( "PT" ) ; InitMessages("PT")
I have tested and work properly now. Otherwise with the old sintax for PORTUGUESE is coming with following error:
Error BASE/1303 Erro nos parametros: __HB_LANGSELECT
Called from __HB_LANGSELECT(0)
Called from HB_LANGSELECT(0)
Called from MAIN(27)
So please Dr. Soto, include this changing for next release. I have already added in
Pendings for NEXT release ( REMINDER ) message for providences.
Re: HMG 3.1.3 (Test)
Posted: Wed May 29, 2013 1:28 pm
by srvet_claudio
Done: points: 1, 2, 9 and 12