# Formeleon 🦎 > Multi-tenant, highly flexible form generator with seamless website integration and built-in bot protection. *Diese Dokumentation auf Deutsch lesen: [README.md](./README.md)* --- ## 📋 Overview Formeleon is a centrally hosted service (ChamäleonCloud) allowing multi-tenant clients to embed dynamic web forms into any website via a simple HTML/JavaScript snippet. ### Key Features * **Seamless Integration:** Embed via lightweight JS snippet. * **Flexible Schemas:** Dynamic JSON payloads stored via SQLAlchemy. * **Security First:** OIDC authentication (Zitadel), Public-Key handshakes, Origin/Referer validation, and reCAPTCHA v3 integration. * **UX & Anti-Bot:** Interactive button state management (traffic light / spinner). * **Export & Reporting:** On-demand HTTP streaming exports (CSV/JSON/YAML) and automated email dumps. --- ## 🛠️ Tech Stack * **Backend:** Python 3.13, Flask (Blueprints), Flask-SQLAlchemy, Flask-Migrate * **Frontend (Admin UI):** Bootstrap 5, Mithril.js * **Auth:** OIDC / Zitadel * **Deployment:** Docker, Gunicorn, Gitea Actions --- ## 🌍 Internationalization (i18n) via Flask-Babel Formeleon's admin dashboard supports multiple languages (currently English and German) using the industry standard `Flask-Babel` (gettext). ### 1. Marking Strings in Code To mark a text for translation, it must be wrapped with the `_()` function in your Python or HTML code. **In HTML (Jinja2 Templates):** ```html

Welcome to the Dashboard

{{ _('Welcome to the Dashboard') }}

``` **In Python files:** ```python from flask_babel import _ # Before flash('Form saved successfully!', 'success') # After flash(_('Form saved successfully!'), 'success') ``` ### 2. The Translation Workflow (CLI) When new strings have been marked in the codebase, they must be extracted and the language files updated. Run the following commands within your active virtual environment (`source venv/bin/activate`): ```bash # 1. Scans the code for marked strings and generates the master template (messages.pot) pybabel extract -F babel.cfg -k _l -o messages.pot routes services templates utils # 2. Merges the new template with existing translations (in the 'translations' folder) without overwriting your old translations pybabel update -i messages.pot -d translations # -> NOW open e.g. translations/de/LC_MESSAGES/messages.po in your text editor and provide your translations at the msgstr "" lines! <- # 3. Compiles the raw .po text files into highly optimized .mo machine files for the web server pybabel compile -d translations ```