Antonio,
Ithinked to create the possibility to have a file type Lang.lng and insert on this all texts
sample :
and then I made this function to load astrings from lang.lng
then we can have a file into application folder and modify it with a xbrowse
What Do you think about ?
Ithinked to create the possibility to have a file type Lang.lng and insert on this all texts
sample :
[Lang]
1=Attention |Atención|Attention|Atenção|Achtung |Attenzione
2=PDF Plugin Error|Error del plugin de PDF|Erreur de plugin du PDF|Erro do plugin do PDF|PDF Plugin Fehler|Errore del plug PDF
3=PDF not saved to send Email|No se ha guardado el PDF a enviar por Email|PDF Non enregistré pour envoi Email|PDF não foi salvo para mandar por email|PDF nicht gespeichert. um E-Mail zu senden|PDF non salvato per inviare e-mailand then I made this function to load astrings from lang.lng
#INCLUDE "FiveWin.ch"
#INCLUDE "Xbrowse.ch"
Function test()
Local cIni:=cFilePath(GetModuleFileName( GetInstance() ) ) + "lang.lng"
LOCAL cString :=""
LOCAL aStrings := {}
LOCAL i := 1
LOCAL lContinue := .T.
DO WHILE lContinue = .T.
cString := GetIni( cIni, "LANG", ALLTRIM(STR(i++,4)), "" )
IF .NOT. EMPTY( cString )
AADD( aStrings, { ALLTRIM( StrToken( cString, 1, "|" ) ), ;
ALLTRIM( StrToken( cString, 2, "|" ) ), ;
ALLTRIM( StrToken( cString, 3, "|" ) ), ;
ALLTRIM( StrToken( cString, 4, "|" ) ), ;
ALLTRIM( StrToken( cString, 5, "|" ) ), ;
ALLTRIM( StrToken( cString, 6, "|" ) ) } )
ELSE
lContinue := .F.
ENDIF
ENDDO
IF LEN( aStrings ) = 0
MsgStop( "No languages defined in " + ALLTRIM( cIni ) )
RETURN(.F.)
ELSE
//only for trace
xbrowser aStrings
ENDIF
RETURN (.T.)
//-----------------------------------------------------------------------//
FUNCTION GetIni( cIni, cSection, cEntry, xDefault )
LOCAL oIni
LOCAL xVar := xDefault
* DEFAULT cIni := oApp:cIniFile
INI oIni FILE cIni
GET xVar ;
SECTION cSection ;
ENTRY cEntry ;
DEFAULT xDefault ;
OF oIni
ENDINI
RETURN xVarthen we can have a file into application folder and modify it with a xbrowse
What Do you think about ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com