Skip to main content

No project description provided

Project description

Smart Translator

If the intelligent translation feature is enabled and the language of the user text matches the language the user translates into, then the text is automatically translated into the default language

The ability to auto-check the text for errors

Using Smart Translation

from smart_translator import SmartTranslate

translator = SmartTranslate()

print(translator.translate('Hallo Welt', 'de'))
>>> Hello World

Checking the spelling of the text

from smart_translator import SmartTranslate

translator = SmartTranslate()

print(translator.auto_spelling('Hillo Wrld', 'de').spelling_text)
>>> Hello World

Translation of the text corrected from errors

from smart_translator import SmartTranslate

translator = SmartTranslate()

print(translator.auto_spelling('Hillo Wrld', 'de').result)
>>> Hallo Welt

All available languages

from smart_translator import SmartTranslate

print(translator.LANGUAGES)

Translation without using smart translation

from smart_translator import SmartTranslate

translator = SmartTranslate(smart_translation=False)

print((translator.translate('Hello World', 'en')))
>>> Hello World

Default language selection

from smart_translator import SmartTranslate

translator = SmartTranslate(default_language='de')

print((translator.translate('Hello World', 'en')))
>>> Hallo Welt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SmartTranslator-1.4.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file SmartTranslator-1.4.tar.gz.

File metadata

  • Download URL: SmartTranslator-1.4.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for SmartTranslator-1.4.tar.gz
Algorithm Hash digest
SHA256 fb7030e1aff897c0dd9f1039fbc54e69eca374c7364e89e4863f00ac2d725ad1
MD5 1adb18f42e221608422724454c89f9fd
BLAKE2b-256 7ba1728efb866640ef7060c732d265c61901c29c63a7b310214338c89fdeaf2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page