Metadata-Version: 2.4
Name: CMT-SALanguages
Version: 1.0.0
Summary: Write Python code in South Africa's 11 official languages
Home-page: https://github.com/mzwandile/CMT-SALanguages
Author: Mzwandile Zulu
License: MIT
Keywords: south africa,isizulu,isixhosa,afrikaans,sesotho,setswana,sepedi,siswati,isindebele,tshivenda,xitsonga,programming language,transpiler,education
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Compilers
Classifier: Intended Audience :: Education
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: requires-python
Dynamic: summary

# CMT-SALanguages 🇿🇦

**Write Python code in all 11 official South African languages.**

Developed by Mzwandile.

## Install

```bash
pip install CMT-SALanguages
```

## Use it

```python
from CMT_SALanguages import isizulu as CAL

CAL.sebenza('phrinta("Sawubona Mzansi!")')
```

Each language is its own module with the same set of functions:

| Function | Meaning |
|---|---|
| `sebenza(code)` / `run(code)` | Run a string of code |
| `fayela(path)` | Run a file |
| `phendula(code)` | Run and return output as a string |
| `guqula(code)` | Transpile to Python (return as string) |
| `amagama()` | Print all keywords for this language |
| `live()` | Start the live editor |

## Supported languages

```python
from CMT_SALanguages import isizulu     as CAL   # isiZulu
from CMT_SALanguages import isixhosa    as CAL   # isiXhosa
from CMT_SALanguages import afrikaans   as CAL   # Afrikaans
from CMT_SALanguages import sesotho     as CAL   # Sesotho
from CMT_SALanguages import setswana    as CAL   # Setswana
from CMT_SALanguages import sepedi      as CAL   # Sepedi
from CMT_SALanguages import siswati     as CAL   # siSwati
from CMT_SALanguages import isindebele  as CAL   # isiNdebele
from CMT_SALanguages import tshivenda   as CAL   # Tshivenda
from CMT_SALanguages import xitsonga    as CAL   # Xitsonga
from CMT_SALanguages import english     as CAL   # English (SA)
```

## Example — isiZulu

```python
from CMT_SALanguages import isizulu as CAL

CAL.sebenza('''
isigaba Umuntu:
    sebenza _qala_(kulo, igama):
        kulo.igama = igama

    sebenza zikhulume(kulo):
        phrinta("Sawubona, " + kulo.igama + "!")

u = Umuntu("Thandi")
u.zikhulume()
''')
```

## Example — Afrikaans

```python
from CMT_SALanguages import afrikaans as CAL

CAL.sebenza('''
funksie groet(naam):
    druk("Hallo, " + naam + "!")

groet("Pieter")
''')
```

## Example — Setswana

```python
from CMT_SALanguages import setswana as CAL

CAL.sebenza('''
fa palo > 10:
    gatisa("Palo e kgolo")
kgotsa_fa palo == 10:
    gatisa("E lekana")
fa_go_sa_nnaleng_jalo:
    gatisa("E nnye")
''')
```

## List all languages

```python
import CMT_SALanguages as sa
sa.list_languages()
```

---

*Sikhona. Re teng. Ons bestaan. We exist.* 🇿🇦
