Hello,
I want to translate words from products data into my language.
I was thinking of a Xbrowse with 2 columns
Flemisch - English
Zwart - Black
Broek - Trouwsers
Broek - Trouwser
etc...
The product database will then be checked for the field "Description" and find all englisch words to convert.../ changed in the same dbf.
There are so many functions ))
I have seen functions like : dbftoarr, At, Tokens, ....
Can i have a start idea to proceed ?
Translate words in dbf fields with other words
- Marc Venken
- Posts: 727
- Joined: Tue Jun 14, 2016 7:51 am
Translate words in dbf fields with other words
Marc Venken
Using: FWH 20.08 with Harbour
Using: FWH 20.08 with Harbour
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Translate words in dbf fields with other words
You need to translate whole words, searching case-insensitive.
Use this function
in this manner:
Use this function
Code: Select all
FW_AT( acSub, cString, nStart, nEnd, lWholeWord, lSkipQuotes, cFound, cReplace, lAll )
Code: Select all
aTranslate := ;
{ { "Zwart", "Black" } ;
, { "Broek", "Trouwsers" } ;
, { "Broek", "Trouwser" } ;
}
do while !eof()
cDesc := FIELD->DESCRIPTION
for n := 1 to Len( aTranslate )
FW_AT( aTranslate[ n, 2 ], @cDesc, nil, nil, .t., .f., nil, aTranslate[ n, 1 ], .t. )
next
FIELD->DESCRIPTON := cDesc
SKIP
enddo
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Marc Venken
- Posts: 727
- Joined: Tue Jun 14, 2016 7:51 am
Re: Translate words in dbf fields with other words
Very Nice and working. Thanks !
Marc Venken
Using: FWH 20.08 with Harbour
Using: FWH 20.08 with Harbour