I am creating function for Multi language
Whether logic of attached program is correct or suggest me best one
Regards
Multi language
Moderator: Rathinagiri
Multi language
- Attachments
-
- test.rar
- (988 Bytes) Downloaded 757 times
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Multi language
gracias por compartir Dave...
thanks for sharing Dave
Happy day
thanks for sharing Dave
Happy day
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- serge_girard
- Posts: 3173
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Multi language
Dave,
Nice!
One thing I learned was not to hardcode user-output-text into your application.
For my own clipper application I made
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
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()
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...
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Multi language
Hi Serge
However, this rule may considered negligible in SS samples, I think.
Happy HMG'ing
Good suggestion, nice sampler code, thanksserge_girard wrote:...One thing I learned was not to hardcode user-output-text into your application....
However, this rule may considered negligible in SS samples, I think.
Happy HMG'ing
Viva INTERNATIONAL HMG
- serge_girard
- Posts: 3173
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Multi language
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
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...
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Multi language
Agreedserge_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!
We will wait;When I have more sparetime I will post my login-functions.
happy HMG days
Viva INTERNATIONAL HMG