Multi language

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

Post Reply
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Multi language

Post by bpd2000 »

I am creating function for Multi language
Whether logic of attached program is correct or suggest me best one
Regards
Attachments
test.rar
(988 Bytes) Downloaded 679 times
BPD
Convert Dream into Reality through HMG
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Multi language

Post by esgici »

Thank Dave :)

Nice UT8 sample :arrow:

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2607
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Multi language

Post by danielmaximiliano »

gracias por compartir Dave...

thanks for sharing Dave

Happy day
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Multi language

Post by serge_girard »

Dave,

Nice!

One thing I learned was not to hardcode user-output-text into your application.
For my own clipper application I made

Code: Select all

 
FUNCTION Lang_Descr (TCode, TLanguage)		&& MESSAGES AND TEXT
/************************************/ 
local n
TDescr  := ''
FOR n = 1 TO nNum_Of_Messages
   IF T_CODE [n] == TCode .AND. T_LANGUAGE [n] == TLanguage
      TDescr  :=  ALLTRIM(T_OMS [n] )
      EXIT
   ENDIF
NEXT n

RETURN(TDescr)

Code: Select all

@ nRow, nCOL GRID Grid_KL002		;
	WIDTH  550	* SCR_PWIDTH		;
	HEIGHT 300			;
	HEADERS {Lang_Descr( "252", cLang_Code ), Lang_Descr( "066", cLang_Code ), Lang_Descr( "067", cLang_Code), Lang_Descr( "253", cLang_Code),     Lang_Descr( "149", cLang_Code), Lang_Descr( "147", cLang_Code)  };
	WIDTHS  {   60* SCR_PWIDTH,               100* SCR_PWIDTH,                 100* SCR_PWIDTH,                100* SCR_PWIDTH,                    100* SCR_PWIDTH,                100* SCR_PWIDTH };
   JUSTIFY {  GRID_JTFY_RIGHT,               GRID_JTFY_RIGHT,                 GRID_JTFY_RIGHT,                GRID_JTFY_RIGHT,                    GRID_JTFY_RIGHT,                GRID_JTFY_RIGHT} ;
	FONT "Arial" SIZE wfont1		;
	BACKCOLOR WFocusColor	;
	FONTCOLOR WFontColor BOLD ;
	ON DBLCLICK Edit_KL003()
The message table looks like this:

Message_Code char 3
Message_Text char 80
Message_Lang char 2

Initially load into 3 arrays: T_CODE, T_LANGUAGE, T_OMS.
Code is translated so ther might be some typo.

Greetings, Serge
There's nothing you can do that can't be done...
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Multi language

Post by bpd2000 »

Thank you all
BPD
Convert Dream into Reality through HMG
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Multi language

Post by esgici »

Hi Serge
serge_girard wrote:...One thing I learned was not to hardcode user-output-text into your application....
Good suggestion, nice sampler code, thanks :)

However, this rule may considered negligible in SS samples, I think.

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Multi language

Post by serge_girard »

Esgici,

Yes it maybe.

It should be nice to have standard example functions, like login.
So nobody would have to invent the wheel again, only adept to his likes!

When I have more sparetime I will post my login-functions.

Bye,

Serge
There's nothing you can do that can't be done...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Multi language

Post by esgici »

serge_girard wrote: It should be nice to have standard example functions, like login.
So nobody would have to invent the wheel again, only adept to his likes!
Agreed :)
When I have more sparetime I will post my login-functions.
We will wait;

happy HMG days :D
Viva INTERNATIONAL HMG :D
Post Reply