# Ita/En basic words translator

# Dictionary with 500 English to Italian words
en_to_it = {
    "hello": "ciao", "goodbye": "addio", "please": "per favore", "thank you": "grazie", "yes": "sì",
    "no": "no", "cat": "gatto", "dog": "cane", "food": "cibo", "water": "acqua",
    "friend": "amico", "house": "casa", "car": "macchina", "school": "scuola", "book": "libro",
    "pen": "penna", "sun": "sole", "moon": "luna", "star": "stella", "tree": "albero",
    "flower": "fiore", "bird": "uccello", "fish": "pesce", "bread": "pane", "milk": "latte",
    "cheese": "formaggio", "apple": "mela", "banana": "banana", "orange": "arancia", "grape": "uva",
    "father": "padre", "mother": "madre", "brother": "fratello", "sister": "sorella", "baby": "bambino",
    "man": "uomo", "woman": "donna", "boy": "ragazzo", "girl": "ragazza", "family": "famiglia",
    "city": "città", "village": "villaggio", "street": "strada", "road": "via", "bridge": "ponte",
    "mountain": "montagna", "sea": "mare", "lake": "lago", "river": "fiume", "forest": "foresta",
    "snow": "neve", "rain": "pioggia", "wind": "vento", "cold": "freddo", "hot": "caldo",
    "day": "giorno", "night": "notte", "morning": "mattina", "evening": "sera", "today": "oggi",
    "tomorrow": "domani", "yesterday": "ieri", "time": "tempo", "hour": "ora", "minute": "minuto",
    "second": "secondo", "work": "lavoro", "student": "studente", "teacher": "insegnante",
    "computer": "computer", "phone": "telefono", "music": "musica", "movie": "film", "game": "gioco",
    "ball": "palla", "table": "tavolo", "chair": "sedia", "window": "finestra", "door": "porta",
    "color": "colore", "red": "rosso", "blue": "blu", "green": "verde", "yellow": "giallo",
    "black": "nero", "white": "bianco", "brown": "marrone", "pink": "rosa", "gray": "grigio",
    "small": "piccolo", "big": "grande", "fast": "veloce", "slow": "lento", "good": "buono",
    "bad": "cattivo", "happy": "felice", "sad": "triste", "strong": "forte", "weak": "debole",
    "open": "aperto", "closed": "chiuso", "early": "presto", "late": "tardi", "light": "luce",
    "dark": "buio", "clean": "pulito", "dirty": "sporco", "empty": "vuoto", "full": "pieno",
    "hard": "duro", "soft": "morbido", "new": "nuovo", "old": "vecchio", "rich": "ricco",
    "poor": "povero", "easy": "facile", "difficult": "difficile", "near": "vicino", "far": "lontano",
    "left": "sinistra", "right": "destra", "top": "alto", "bottom": "basso", "middle": "mezzo",
    "first": "primo", "last": "ultimo", "next": "prossimo", "previous": "precedente", "same": "stesso",
    "different": "diverso", "hot": "caldo", "cold": "freddo", "summer": "estate", "winter": "inverno",
    "spring": "primavera", "autumn": "autunno", "January": "gennaio", "February": "febbraio",
    "March": "marzo", "April": "aprile", "May": "maggio", "June": "giugno", "July": "luglio",
    "August": "agosto", "September": "settembre", "October": "ottobre", "November": "novembre",
    "December": "dicembre", "Monday": "lunedì", "Tuesday": "martedì", "Wednesday": "mercoledì",
    "Thursday": "giovedì", "Friday": "venerdì", "Saturday": "sabato", "Sunday": "domenica",
    "one": "uno", "two": "due", "three": "tre", "four": "quattro", "five": "cinque",
    "six": "sei", "seven": "sette", "eight": "otto", "nine": "nove", "ten": "dieci",
    "hundred": "cento", "thousand": "mille", "million": "milione", "who": "chi", "what": "cosa",
    "where": "dove", "when": "quando", "why": "perché", "how": "come", "which": "quale",
    "because": "perché", "with": "con", "without": "senza", "before": "prima", "after": "dopo"
}

# Reverse dictionary
it_to_en = {value: key for key, value in en_to_it.items()}

# Ask for menu language
print("Ita/En basic words translator")
lang = input("Menu IT or EN").lower()

# Menu labels
menu_en = [
    "Choose an option:",
    "1. English to Italian",
    "2. Italian to English",
    "3. Exit",
    "Enter 1-3: ",
    "English word: ",
    "Italian word: ",
    "Italian: ",
    "English: ",
    "Not found.",
    "Goodbye!",
    "Invalid choice."
]

menu_it = [
    "Scegli un'opzione:",
    "1. Inglese a Italiano",
    "2. Italiano a Inglese",
    "3. Esci",
    "Inserisci 1-3: ",
    "Parola inglese: ",
    "Parola italiana: ",
    "Italiano: ",
    "Inglese: ",
    "Non trovato.",
    "Arrivederci!",
    "Scelta non valida."
]

# Use the selected menu language
menu = menu_it if lang == "it" else menu_en

# Main program loop
while True:
    print("\n" + menu[0])
    print(menu[1])
    print(menu[2])
    print(menu[3])
    choice = input(menu[4])

    if choice == "1":
        word = input(menu[5]).lower()
        if word == "kusby":
            print("\nPrizm Translator ")
            print("Created by: Kusby")
            print("Version: 1.0")
            input("\nEXE to exit.")
            print(menu[10])
            break
        elif word in en_to_it:
            print(menu[7], en_to_it[word])
        else:
            print(menu[9])

    elif choice == "2":
        word = input(menu[6]).lower()
        if word == "kusby":
            print("\nTraduttore Prizm ")
            print("Creato da: Kusby")
            print("Versione: 1.0")
            input("\nEXE per uscire.")
            print(menu[10])
            break
        elif word in it_to_en:
            print(menu[8], it_to_en[word])
        else:
            print(menu[9])

    elif choice == "3":
        print(menu[10])
        break

    else:
        print(menu[11])
