Skip to content

Commit

Permalink
Fix README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-pawelek committed Aug 24, 2024
1 parent ceb657a commit 9be7a82
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ from simpleaitranslator.translator import TranslatorOpenAI
translator = TranslatorOpenAI(open_ai_api_key="YOUR_OPENAI_API_KEY")

# Detect language
language_code = translator.get_text_language("Hello world")
print(language_code.language_ISO_639_1_code) # Output: 'en'
print(language_code.language_name) # Output: 'English'
detected_language = translator.get_text_language("Hello world")
print(detected_language.language_ISO_639_1_code) # Output: 'en'
print(detected_language.language_name) # Output: 'English'

```

Expand Down Expand Up @@ -100,9 +100,9 @@ from simpleaitranslator.translator import TranslatorOpenAI
translator = TranslatorOpenAI(open_ai_api_key="YOUR_OPENAI_API_KEY")

# Detect language
language_code = translator.get_text_language("jak ty się nazywasz")
print(language_code.language_ISO_639_1_code) # Output: 'pl'
print(language_code.language_name) # Output 'Polish'
detected_language = translator.get_text_language("jak ty się nazywasz")
print(detected_language.language_ISO_639_1_code) # Output: 'pl'
print(detected_language.language_name) # Output 'Polish'

# Translate text
translated_text = translator.translate("Cześć jak się masz? Meu nome é Adam", "en")
Expand Down

0 comments on commit 9be7a82

Please sign in to comment.