arxiv_post.deepl module#
- arxiv_post.deepl.translate(translatables: Sequence[TL], target_lang: str = 'ja', source_lang: str = 'en', deepl_mode: Literal['auto', 'api', 'browser'] = 'auto', deepl_api_key: str = '', n_concurrent: int = 2, timeout: float = 30.0) List[TL] [source]#
Translate objects written in one language to another.
- Parameters:
translatables – Translatable objects.
target_lang – Language of the translated objects.
source_lang – Language of the original objects.
deepl_mode – Translation mode (auto, api, browser) of DeepL.
deepl_api_key – Authentication Key for DeepL API (api-mode only).
n_concurrent – Number of concurrent translation (browser-mode only).
timeout – Timeout for translation in seconds (browser-mode only).
- Returns:
Translated objects.