File size: 464 Bytes
8551297
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from services.translator import TranslationService

translator = TranslationService()

try:
    test_text = "Hello, how are you?"
    print(f"Testing translation of: '{test_text}'")
    print(f"Target language: Hindi (en-hi)")
    
    result = translator.translate(test_text, 'en-hi')
    print(f"Translation result: '{result}'")
    
except Exception as e:
    print(f"Error occurred: {type(e).__name__}: {str(e)}")
    import traceback
    traceback.print_exc()