I Built a Python Translator App I Needed in 1996

Day 36 of 100 days coding challenge: Python

I was born and raised in Japan, where nearly everyone speaks Japanese—surprise! But my household was a bit unusual. We had one of those rare satellite dishes that could pull in BBC and CNN, which meant English voices echoed through our living room long before they echoed through my brain. Add to that a small mountain of English children’s books, and you’d think I’d grow up effortlessly bilingual. Think again.

Later, I landed at an English-speaking university in Montreal, where people didn’t just speak English and French—they often casually tossed in a third or fourth language, like it was a party trick. Some of my classmates had parents who spoke Spanish at home, studied in French, and flirted in English. Meanwhile, I was sweating over conjugating irregular French verbs.

Despite my early exposure, mastering English (let alone French) was no walk in the linguistic park. Reading was one thing, but writing or speaking? That’s where the wheels came off. And back then—mid-90s Internet era—Google Translate didn’t exist. I had Netscape and patience. What I didn’t have was a little button that magically told me what “mettre en valeur” meant in context.

So today’s project? Python translator app. It’s my time-travel gift to my 1996 self: a translator app that could’ve saved me hours of flipping through dusty dictionaries.

Today’s Motivation / Challenge

Language learners know the pain: you read a sentence, understand each word, and still have no idea what it actually means. That’s the magic of context—and a good translator app can bridge the gap. Today, we build just that: a compact, no-nonsense translator you can summon from your command line like a 90s wizard with a keyboard instead of a wand. The goal isn’t to impress Google—it’s to outdo what the 90s Internet couldn’t give us.

Purpose of the Code (Object)

This simple translator app takes any sentence you feed it and converts it into your language of choice. It automatically detects the source language and spits out the translation, so you don’t even have to guess what language you’re struggling with. Think of it as your pocket linguist—minus the academic snobbery.

AI Prompt

That’s all it took. And with a few nudges, the app started behaving like the polite little translator it was always meant to be.

Functions & Features

  • Detects the input language automatically
  • Translates text to your chosen language
  • Supports dozens of language codes (like en, fr, ja, es)
  • Simple input-output interface via terminal

Requirements / Setup

pip install deep-translator

Tested on Python 3.13, but it works on any modern Python 3.x version.

Minimal Code Sample

from deep_translator import GoogleTranslator

translated = GoogleTranslator(source=’auto’, target=’fr’).translate(“I love books”)

print(translated)  # Prints: J’aime les livres

This line auto-detects the language and translates the sentence into French.

Python translator app

Notes / Lessons Learned

I started with an error today—like a true developer. I tried installing googletrans==4.0.0-rc1, which decided to throw a tantrum because it needed httpx 0.13.3, but my existing openai package was having none of it. The moment I hit run, Python practically screamed: “Pick a side!”

This was the moment I remembered virtual environments exist for a reason. If you’re juggling multiple packages like a circus clown with too many flaming clubs, isolate your apps before things catch fire. I’ll revisit virtual environments properly another day—but for now, I needed a workaround that worked.

Enter deep-translator. Easy install, no dependency drama, and—bonus—it respects your choice to lowercase your language codes. But be warned: this library is case-sensitive. Type FR instead of fr, and it gives you nothing but disappointment. You’ve been warned.

Optional Ideas for Expansion

  • Add a GUI interface with Tkinter or Streamlit to make it look more like a real app
  • Build a “translation history” feature to track past phrases
  • Integrate with a text-to-speech tool for pronunciation help

Leave a Reply

Your email address will not be published. Required fields are marked *