Skip to main content

Argos Translate Files

Translate files using Argos Translate.

Supported file format

.txt, .odt, .odp, .docx, .pptx, .epub, .html, .srt

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'))

Metadata

Release files for argos-translate-files-main 1.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argos-translate-files-main 1.4.2
File Size Uploaded
argos_translate_files_main-1.4.2.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for argos-translate-files-main 1.4.2
File Interpreter ABI Platform
argos_translate_files_main-1.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / argos_translate_files_main-1.4.2.tar.gz

Download URL argos_translate_files_main-1.4.2.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
291ce859397ca4eb516066ecb86f9b697b219eefef999e0ecad2157395430e52
BLAKE2b-256 checksum
How to use checksums
863259b3c7b2a7a8b7b51f7084979fdc56a318b2a13634ad0108625e5eebab5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / argos_translate_files_main-1.4.2-py3-none-any.whl

Download URL argos_translate_files_main-1.4.2-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70d9c1440eeea2f9969963b896424cecc78214a86e994c8904c2ffc0ff634d77
BLAKE2b-256 checksum
How to use checksums
5a88155b82b62056b20ef792d8659c5c7d55d819c609307272adbddf164b7636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.4.2 This release

2 release files

1.4.1

2 release files

1.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page