The Daily Click ::. Forums ::. Klik Coding Help ::. Translation tool
 

Post Reply  Post Oekaki 
 

Posted By Message

Menthalmotion



Registered
  20/01/2007
Points
  42
20th March, 2007 at 12:53:02 -

Two edit boxes, one for the first language to the other one
And one for the second back to the first.
When you write a word in the first box, the translation will show up in the other when you press a button.
I just dont know how to do it really.
Any ideas?

 
Timetravel ^^
* Bad english warning

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
20th March, 2007 at 13:07:38 -

Use a two-dimensional array or something. Shouldn't be too hard. I think Phizzy wrote an article on this, you could try DC searching for 'translator system'.

Image Edited by the Author.

 
n/a

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
20th March, 2007 at 13:33:41 -

http://www.create-games.com/download.asp?id=5198

 
My signature is never too big!!!

jpSoul



Registered
  25/10/2003
Points
  1714
20th March, 2007 at 13:40:35 -

try something with Associative Array object. it allows you to store strings !
you have 2 edit objects, you type the words in the Edit1 and you have the translated word in the Edit2

1/ to make the database, store strings into your array: the name of the Key is your original word, and the name of the string you store into is the translated word.

2/ make a system to check if the word typed exist in the database, it's quite simple:

Upon pressing Enter (or another condition^^) => set the text of Edit2 to GetString$( "AssArray Object", Edittext$( "Edit1" ))

if the word typed in the Edit1 exists somewhere in the array, his translation will be displayed in the Edit2

 
n/a

jpSoul



Registered
  25/10/2003
Points
  1714
20th March, 2007 at 13:43:39 -

notice that you can do EXACTLY the same method with an INI object... it's maybe easier to manage when you have a lot of words...

 
n/a

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
20th March, 2007 at 18:32:49 -

It also depends how accurate you want your dictionary app to be.

Depending on different situations, a different word may suit the situation better.

Perhaps make it so you type a word in one language, and get a list of possible words in the other?

An example using portuguese might be:

ENGLISH WORD: "CALL"

RESULTS:

Nouns:
- Chamada (shout, telephone call)
- Telefonema (telephone call)
- Canto (of bird, birdsong)
- Visita (to call on someone, a visit)

Verbs:
- Chamar (to name)
- Chamar (to phone)
- Gritar (to call loudly, to cry out)
- Telefonar (to phone)
- Visitar (to call on someone, to visit)

See what I mean? Any one of these words may be appropriate, I'd have to choose one.

 
191 / 9999 * 7 + 191 * 7
   

Post Reply



 



Advertisement

Worth A Click