Translate files with Argos Translate
Project description
Argos Translate Files
Translate files using Argos Translate.
Supported file format
.txt, .odt, .odp, .docx, .pptx, .epub, .html
Install
pip install argos-translate-files
Example
import os.path
import argostranslate.package, argostranslate.translate
import argostranslatefiles
from argostranslatefiles import argostranslatefiles
from_code = "fr"
to_code = "en"
installed_languages = argostranslate.translate.get_installed_languages()
from_lang = list(filter(
lambda x: x.code == from_code,
installed_languages))[0]
to_lang = list(filter(
lambda x: x.code == to_code,
installed_languages))[0]
underlying_translation = from_lang.get_translation(to_lang)
argostranslatefiles.translate_file(underlying_translation, os.path.abspath('path/to/file.txt'))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for argos-translate-files-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94878de6b67ef2004297c4a8838f526e3fe550084a6ca334dc902dff666d0bd3 |
|
MD5 | 3d02531f9769601daeb8d83b7faa8d28 |
|
BLAKE2b-256 | 92d6559319225a96f751bd99f918829f25518a4b49b5c32f98fba6c5556cb9a3 |
Close
Hashes for argos_translate_files-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6861c244f8ec52d4bf92520fe6f80b01ff254d750209380b81005ff34df01f7 |
|
MD5 | 3d42905407d11e6cc397249235b430a9 |
|
BLAKE2b-256 | 0c055a8dd8a1d77f4b98aeda4b3404f1be3774585a845050f20c2dbcc71e115f |