region:us
from googletrans import LANGUAGES, Translator
import deepl

# Initialize Google Translate
translator = Translator()

# Initialize DeepL
deepl_api_key = 'YOUR_DEEPL_API_KEY'
deepl_client = deepl.Client(deepl_api_key)

# Text to translate
text = 'Hello, how are you?'

# Translate using Google Translate
google_translations = {}
for lang_code, lang_name in LANGUAGES.items():
    translation = translator.translate(text, dest=lang_code).text
    google_translations[lang_name] = translation
print('Google Translate:', google_translations)

# Translate using DeepL
deepl_translations = {}
for lang_code, lang_name in LANGUAGES.items():
    translation = deepl_client.translate(text, target_lang=lang_code)['translations'][0]['text']
    deepl_translations[lang_name] = translation
print('DeepL:', deepl_translations)