+ 2

How to Make Custom Translate?

<div> <p>TES</p> </div> <div> <script> function check(){ document.write("hi " + document.myForm.word.value) } </script> <form name="myForm"> <p>Tos Translator <input type = "text" name = "word" value = ""> <p> <input type = "submit" onClick= "check(); return false"> </p> </p> </div> </form> How to make like googke translate? I want make be : Input: (box Tos Translator [input word][button] /box) Output: (box Result Translate [sentence+tos sentence+tos sentence+tos] /box) I want to make a translate like google translate, and if the text input is filled in "test tus tas tos tus" then if the button is pressed the result is "testos tistos tastos tostos tustos" In essence, the case automatically added the "sentence + tos" please help me to make this is.

18th Jul 2020, 6:27 PM
Ahmad Sofiyurrohman
Ahmad Sofiyurrohman - avatar
13 ответов
20th Jul 2020, 9:07 AM
Ore
Ore - avatar
+ 3
Mr ASR how? Can you just show example of what you want to do or just post the code you trying to work on?
19th Jul 2020, 5:26 AM
Infinite
Infinite - avatar
+ 3
Mr ASR saying you want to convert your inputted value to a different output(translate) when a button is pressed can easily be manipulated using if else statements, that can easily be done with the code i posted above.
19th Jul 2020, 5:34 AM
Infinite
Infinite - avatar
+ 3
Ok, i will try if i can do it
19th Jul 2020, 5:39 AM
Infinite
Infinite - avatar
+ 3
Mr ASR check this out bro. Feel free to message me if you have any question on it https://code.sololearn.com/WR92KiClrseQ/?ref=app
19th Jul 2020, 3:01 PM
Infinite
Infinite - avatar
+ 2
https://code.sololearn.com/WR92KiClrseQ/?ref=app I think this should be able to answer you question. If you have any other question, you can message me and i would help if i know it.
18th Jul 2020, 10:27 PM
Infinite
Infinite - avatar
+ 2
Mr ASR ok, done
19th Jul 2020, 3:20 PM
Infinite
Infinite - avatar
+ 2
Create a translator class. Set some default values for two language array attributes. For example Spanish and English. Create a sentence class and a word class. Each of these classes should split() or join() the inputs. You enter a whole paragraph on an input value or a textarea and get it on js. Split the paragraph into sentences and the sentences into words. Convert each word. Recreate the words into sentences and the sentences into a paragraph of the new language. Compare the words on a loop on the translator class. I made a translator long time ago in C# but it can be done easily in web (JavaScript). It will take you 2 weeks to a month of trial and error until you get it right. After you finish, give your page a good styling like Google's but with another color palette and name. Impress those near you. It will be more perfect if you could read from text files or database but that requires server side language and the use of AJAX.
20th Jul 2020, 7:52 AM
carlos mercado
carlos mercado - avatar
+ 1
Infinite No Effect?
19th Jul 2020, 1:43 AM
Ahmad Sofiyurrohman
Ahmad Sofiyurrohman - avatar
+ 1
Infinite i want to make translate box Ilustration : (Translate) [inputtext] [button] [outputtext] if input text in inputtext box "hey guy te le po" will showed in outputext box "heys guys tes les pos" per sentance will added sentance+s
19th Jul 2020, 5:32 AM
Ahmad Sofiyurrohman
Ahmad Sofiyurrohman - avatar
+ 1
Infinite yes i want coverted input value with click the button. output: (sentance+s sentance+s sentance+s) or (hey+s bro+s guy+s)
19th Jul 2020, 5:36 AM
Ahmad Sofiyurrohman
Ahmad Sofiyurrohman - avatar
+ 1
Infinite ok thanks bro for help me :)
19th Jul 2020, 5:40 AM
Ahmad Sofiyurrohman
Ahmad Sofiyurrohman - avatar
+ 1
Infinite check message
19th Jul 2020, 3:13 PM
Ahmad Sofiyurrohman
Ahmad Sofiyurrohman - avatar