Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xxyzz/mediawiki_langcodes
Convert MediaWiki language names and language codes.
https://github.com/xxyzz/mediawiki_langcodes
mediawiki python
Last synced: 4 months ago
JSON representation
Convert MediaWiki language names and language codes.
- Host: GitHub
- URL: https://github.com/xxyzz/mediawiki_langcodes
- Owner: xxyzz
- License: gpl-3.0
- Created: 2023-11-03T12:29:56.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-07T11:13:00.000Z (4 months ago)
- Last Synced: 2024-10-09T18:42:04.318Z (4 months ago)
- Topics: mediawiki, python
- Language: Python
- Homepage:
- Size: 321 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MediaWiki langcodes
Convert MediaWiki language names and language codes.
## Build dependencies
- php
- wget
## Build
```
$ python -m venv .venv
$ source .venv/bin/activate.fish
$ python -m pip install -U pip build
$ make
```## Usage
```python
from mediawiki_langcodes import code_to_name, name_to_codecode_to_name("fr") # return "français"
code_to_name("fr", "en") # return "French"
name_to_code("français") # return "fr"
name_to_code("français", "fr") # return "fr"
```