HMG 3.1.3

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 1908
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 83 times
Contact:

Re: HMG 3.1.3 (Test)

Post by srvet_claudio » Tue May 28, 2013 5:15 am

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

................
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

Abdul Haris
Posts: 1
Joined: Mon May 27, 2013 4:38 pm

Post by Abdul Haris » Tue May 28, 2013 10:10 am

Hi Rathi and Dr. Claudio,

Thanks for the bug fixes and New Release :D

Regards,
Haris

User avatar
Pablo César
Posts: 4010
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 99 times
Been thanked: 159 times

Post by Pablo César » Tue May 28, 2013 10:23 am

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
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
srvet_claudio
Posts: 1908
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 83 times
Contact:

Post by srvet_claudio » Tue May 28, 2013 12:28 pm

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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
Pablo César
Posts: 4010
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 99 times
Been thanked: 159 times

Post by Pablo César » Tue May 28, 2013 12:33 pm

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 ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4010
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 99 times
Been thanked: 159 times

Post by Pablo César » Tue May 28, 2013 1:29 pm

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).
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
srvet_claudio
Posts: 1908
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 83 times
Contact:

Post by srvet_claudio » Tue May 28, 2013 2:01 pm

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
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
Pablo César
Posts: 4010
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 99 times
Been thanked: 159 times

Post by Pablo César » Tue May 28, 2013 2:12 pm

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].
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4010
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 99 times
Been thanked: 159 times

Post by Pablo César » Wed May 29, 2013 2:57 am

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.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
srvet_claudio
Posts: 1908
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 83 times
Contact:

Post by srvet_claudio » Wed May 29, 2013 1:28 pm

Done: points: 1, 2, 9 and 12
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest