Multi language

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

Post Reply
User avatar
bpd2000
Posts: 964
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 137 times
Been thanked: 43 times

Multi language

Post by bpd2000 » Fri Sep 13, 2013 2:39 pm

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 242 times
BPD
Convert Dream into Reality through HMG

User avatar
esgici
Posts: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 247 times
Been thanked: 91 times
Contact:

Post by esgici » Fri Sep 13, 2013 3:37 pm

Thank Dave :)

Nice UT8 sample :arrow:

Viva HMG :D
Viva INTERNATIONAL HMG :D

User avatar
danielmaximiliano
Posts: 2052
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 90 times
Been thanked: 14 times
Contact:

Post by danielmaximiliano » Fri Sep 13, 2013 6:24 pm

gracias por compartir Dave...

thanks for sharing Dave

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

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

User avatar
serge_girard
Posts: 1908
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 319 times
Been thanked: 74 times
Contact:

Post by serge_girard » Sat Sep 14, 2013 7:53 am

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

User avatar
bpd2000
Posts: 964
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 137 times
Been thanked: 43 times

Post by bpd2000 » Sat Sep 14, 2013 8:35 am

Thank you all
BPD
Convert Dream into Reality through HMG

User avatar
esgici
Posts: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 247 times
Been thanked: 91 times
Contact:

Post by esgici » Sat Sep 14, 2013 8:36 am

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: 1908
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 319 times
Been thanked: 74 times
Contact:

Post by serge_girard » Sat Sep 14, 2013 8:48 am

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

User avatar
esgici
Posts: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 247 times
Been thanked: 91 times
Contact:

Post by esgici » Sat Sep 14, 2013 8:56 am

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