i have now use FWString() ... WOW
i CODE i found
Code: Select all | Expand
FWString( "Please add it to FWH\source\function\strings.prg" )
![Question :?:](./images/smilies/icon_question.gif)
![Question :?:](./images/smilies/icon_question.gif)
Question : can i make my own "aStrings" and use a copy of FWString()
![Question :?:](./images/smilies/icon_question.gif)
Code: Select all | Expand
FWString( "Please add it to FWH\source\function\strings.prg" )
Code: Select all | Expand
// Add Tranlates for Spanish and German
#include "fivewin.ch"
function Main()
AddTranslates()
FWSetLanguage( 2 ) // Spanish
? FWString( "medium" )
FWSetLanguage( 5 ) // German
? FWString( "large" )
return nil
static function AddTranslates()
local aTranslates := { ;
{ "large", "grande", nil, nil, "groß" }, ;
{ "medium", "medio", nil, nil, "Mittel"}, ;
{ "small", "pequeño", nil, nil, "klein" }, ;
{ "tiny", "diminuto", nil, nil, "winzig" } ;
}
AEval( aTranslates, { |a| FWAddString( a ) } )
return nil
GREATnageswaragunupudi wrote:We need not make any new libs.
We can add new translates to the existing translates at runtime, preferably at the beginning of our program.
This is a sample.
Here the programmer is adding new translates for Spanish and German languages, so that his software can be used by English, Spanish and German users.
Code: Select all | Expand
LOCAL aTRANSLATE := {}
AADD(aTRANSLATE,{'soon here in the forum','pronto aqui en el foro','bientôt ici sur le forum','em breve aqui no forum','demnächst hier im Forum','presto qui nel forum'})
Code: Select all | Expand
Function FW_TransLang( cTSource, cLSource, cLTarget, lUTf8 )
Code: Select all | Expand
? FW_TransLang( "This is very nice", "en", "te", .t. )
oh, i didn´t know thatnageswaragunupudi wrote:We already have this built-in FWH function for the last six years:
interesting IdeaAntonio Linares wrote:Could we do the translations automatically ?
I mean, If the Word translation is not found then it automatically invoke google to translate it and feed the array
thx for Link but there is no Source CODE of Function FW_TransLang()cnavarro wrote:https://forums.fivetechsupport.com/viewtopic.php?f=6&t=39139&start=0&hilit=fw+translang