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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6124eaa9df8abf64159408c0d257f8211c7bac9d439af07424845e06fdf265c3 |
|
MD5 | c0d25f7f82da8f43eeb46d140b0688e7 |
|
BLAKE2b-256 | 1e0669b854cf4321679e3595c0521148601b5a8735492bf48d8c2631720bc96c |
Close
Hashes for argos_translate_files-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c52b65105bf2bc12bac0edafbd89c25d64bcb4ffc8f455fc2ea72d3083cb077 |
|
MD5 | 4994e09b36933b933d51362e09d5b808 |
|
BLAKE2b-256 | 71e2148596826b6308a4a0a583c232c5349a6560bc057b69aceee4ba1054d759 |