Hosts and promotes all available Telegram language localizations, with alphabetic and geo-political search.
@langAtlasBot is a Telegram bot that lets users discover, search, and install Telegram language localizations. Through an inline button interface, users can browse hundreds of languages and apply them to the app in a single click.
| Feature | Description |
|---|---|
| π Alphabetic catalogue | Browse languages by their initial letter |
| π Geo-political catalogue | Navigate by continent β country β languages |
| β Language request | Propose a missing language for inclusion in the Atlas |
| π¬ Feedback | Send comments and suggestions to administrators |
| π Inline mode | Search and share languages directly in any chat |
| π£ Multilingual UI | The bot interface itself is available in 6 languages |
| Code | Language |
|---|---|
it |
Italiano |
en |
English |
fur |
Furlan (Friulian) |
vec |
Vèneto (Venetian) |
es |
EspaΓ±ol |
cat |
CatalΓ |
- python-telegram-bot 21.5 β async Telegram Bot API library
- MySQL β database for users, languages, countries and requests
- GNU gettext β internationalisation (i18n) system
- python-dotenv β secure environment variable management
langAtlasBot/
βββ bot.py # Entry point β handler registration and polling
βββ config.py # Loads configuration from .env
βββ database.py # Database layer (context manager, parameterised queries)
βββ handlers.py # All bot logic (callbacks, conversations, inline mode)
βββ broadcast.py # Async broadcast to all users when a new language is added
βββ utils.py # get_translator() β thread-safe i18n with English fallback
βββ .env.example # Environment variable template
βββ requirements.txt
βββ setup_service.sh # Installs the bot as a systemd service
βββ update_translations.sh # Extracts, merges and compiles .po/.mo files
βββ locale/
βββ it/LC_MESSAGES/langAtlasBot.{po,mo}
βββ en/LC_MESSAGES/langAtlasBot.{po,mo}
βββ fur/LC_MESSAGES/langAtlasBot.{po,mo}
βββ vec/LC_MESSAGES/langAtlasBot.{po,mo}
βββ es/LC_MESSAGES/langAtlasBot.{po,mo}
βββ cat/LC_MESSAGES/langAtlasBot.{po,mo}
- Python 3.11+
- MySQL 8+
libmysqlclient-dev(required to buildmysqlclient)gettext(required for translations)
sudo apt install python3 python3-venv libmysqlclient-dev gettextgit clone https://github.com/garboh/langAtlasBot.git
cd langAtlasBotpython3 -m venv venv
source venv/bin/activate
pip install -r langAtlasBot/requirements.txtcp langAtlasBot/.env.example langAtlasBot/.env
nano langAtlasBot/.envBOT_TOKEN=your_token_from_BotFather
DB_HOST=127.0.0.1
DB_USER=your_db_user
DB_PASS=your_db_password
DB_NAME=langAtlasBot
ADMIN_GROUP_ID=-100xxxxxxxxxImport the SQL schema into your MySQL database:
mysql -u root -p langAtlasBot < schema.sqlbash langAtlasBot/update_translations.sh compilepython -m langAtlasBotFor a production Linux deployment with automatic restarts:
sudo bash langAtlasBot/setup_service.shThe script will:
- Create the virtual environment and install dependencies
- Compile translation files
- Register and start the
langAtlasBotsystemd service
Useful commands after installation:
sudo journalctl -u langAtlasBot -f # live logs
sudo systemctl restart langAtlasBot # restart
sudo systemctl stop langAtlasBot # stopBot UI strings use GNU gettext. To update or add a language:
# Extract strings from source, update .po files and recompile .mo files
bash langAtlasBot/update_translations.sh
# Recompile only, after editing a .po file manually
bash langAtlasBot/update_translations.sh compile.po files are located at locale/<lang_code>/LC_MESSAGES/langAtlasBot.po and can be edited with Poedit or any text editor.
To contribute a translation, fork the repository, edit the relevant .po file and open a Pull Request.
If you'd like to add a new language, create the directory locale/<lang_code>/LC_MESSAGES/, copy locale/en/LC_MESSAGES/langAtlasBot.po as a starting point, translate the strings and submit a PR.
Note: We are looking for a free hosted translation platform (e.g. Weblate) to make contributing easier. Contributions via GitHub PR are welcome in the meantime.
| Table | Description |
|---|---|
user |
Registered users, preferred language, conversation state |
lang |
Languages with localised names in 6 languages, flag and code |
customLang |
Non-standard / custom languages |
continent |
Continents with localised names |
country |
Countries with localised names and continent association |
country_lang |
Country β language mapping |
richieste |
User-submitted language inclusion requests |
feedback |
User feedback messages |
- All credentials are loaded exclusively from
.envβ no secrets in source code - SQL column names are resolved from internal whitelist dictionaries, never interpolated from user input
- All queries use parameterised placeholders (
%s) - Every database connection is managed via a context manager with automatic rollback on error
- Fork the repository
- Create a branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add ...') - Open a Pull Request
To propose a new language for the Atlas, use the bot directly: @langAtlasBot
- Federico Campagnolo β concept and design
- Francesco Garbo β development and maintenance
- CΓ²daze Veneto β localisation and outreach
Distributed under the GNU General Public License v3.0 License. See LICENSE for details.