Skip to main content

# helptranslator: help() for everyone.

This is an experimental python package that translates Python's **help()** text
to any language using Google Translate!

Why? Because learning Python shouldn't require fluency in English, and the help() function
is the most language-intensive part of the early programming language learning experience.
Plus, Python 3 fully supports Unicode, so why not?

## Installation

```bash
pip install helptranslator
```

## Example

Calling the **set_help_lang()** function overrides the built-in **help()** function,
so working with helptranslator is essentially a two-liner:

```python
import helptranslator
helptranslator.set_help_lang('german')
```

That's it! Let's change the help text to German and look at the sum() function:

```python
import helptranslator
helptranslator.set_help_lang('german')

help(sum)
>> Hilfe zur eingebauten Funktionssumme in den eingebauten Modulen:

Summe (iterierbar, Start = 0, /)
    Gibt die Summe eines "Start" -Werts (Standard: 0) plus einer Anzahl von Zahlen zurück
    
    Wenn das iterable leer ist, geben Sie den Startwert zurück.
    Diese Funktion ist speziell für die Verwendung mit numerischen Werten und möglicherweise vorgesehen
    lehnen Sie nicht-numerische Typen ab.

```

Or Chinese:

```python
import helptranslator
helptranslator.set_help_lang('chinese (simplified)')

help(sum)
>> Hilfe zur eingebauten Funktionssumme in den eingebauten Modulen:

帮助内置函数总和模块builtins:

sum(iterable,start = 0,/)
    返回“开始”值(默认值:0)加上可迭代的数字的总和
    
    当迭代器为空时,返回起始值。
    此功能专门用于数字值和可能
    拒绝非数字类型。

```

Or Russian:

```python
import helptranslator
helptranslator.set_help_lang('russian')

help(sum)
>> Справка по встроенной функции sum в встроенных модулях:

sum (iterable, start = 0, /)
    Возвращает сумму значения «start» (по умолчанию: 0) плюс итерабельность чисел
    
    Когда итерабельность пуста, верните начальное значение.
    Эта функция предназначена специально для использования с числовыми значениями и может
    отклонять нечисловые типы.
```


## Todos

Well, clearly this is a limited approach. It requires an internet connection, long
texts fail in their connections, and I haven't added IPython support yet. The last
two can be fixed pretty easily (if you are interested in having this, let me know!) but
the first requires a more thoughtful approach. Personally, I'm imagining some kind of
stub file that package developers can create for their packages.

Hopefully, this is useful, and generates some conversation about increasing programming
education around the world!


Metadata

Release files for helptranslator 0.0.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 helptranslator 0.0.2
File Size Uploaded
helptranslator-0.0.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for helptranslator 0.0.2
File Interpreter ABI Platform
helptranslator-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.2 kB

Release files / helptranslator-0.0.2.tar.gz

Download URL helptranslator-0.0.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c7255f92f952d3db578b08b6ea3b159509fa7c0c76c27045849125c02f1dd8c9
BLAKE2b-256 checksum
How to use checksums
00b41eb7867c7aceeab97c0bdd79ce6ff3be479e8277403d63306cf1c7a30409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / helptranslator-0.0.2-py3-none-any.whl

Download URL helptranslator-0.0.2-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
207c65197c87dd7788823a4652b1fcf3cf9f78ae710b4f00359ecf84d400e95e
BLAKE2b-256 checksum
How to use checksums
5367e5348486187cc8cb9bbb0de01335c57791c29b246fcb8a5dd9b773077ccc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

3 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