Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket758 authored May 13, 2020
1 parent d301625 commit eeeba5f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions GUI Translator using Tkinter/Translator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from tkinter import *
from googletrans import Translator
from tkinter.messagebox import showinfo

window = Tk()
window.title('Translator')
window.geometry('200x100')

translator = Translator()


def dotranslation():
word = entry.get()
result = translator.translate(word).text
showinfo('Translation', result)


label1 = Label(window, text="Enter your string: ")
label1.grid(row=0, column=0)

entry = Entry(window)
entry.grid(row=1, column=0)

button = Button(window, text='Translate', command=dotranslation)
button.grid(row=2, column=0)

window.mainloop()

0 comments on commit eeeba5f

Please sign in to comment.