Skip to content

dl-Solutions-dev/I18nForgeX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Delphi Build Status

I18nForgeX

Scan your code. Forge your translations. Generate your i18n files.

I18nForgeX is a developer tool that scans HTML files to extract i18n keys and labels, generates structured Excel translation workbooks, and automatically builds i18n translation files.

It simplifies internationalization workflows and helps keep translation files synchronized with the source code.


✨ Features

  • 🔎 Scan HTML files to detect i18n markers (data-i18n)
  • 🗝 Extract translation keys and labels
  • 📊 Generate Excel workbooks for translators
  • 🌍 One sheet per language
  • ⚠ Detect missing translations
  • 🤖 Automatically translate missing labels using DeepL
  • 📦 Generate i18n translation files (JSON, YAML, etc.)
  • 🔄 Keep translations synchronized with source code

🧭 Workflow

HTML files
   ↓
Scan for data-i18n
   ↓
Extract keys and labels
   ↓
Generate Excel translation file
   ↓
Translate missing entries
   ↓
Generate i18n translation files

📦 Installation

Clone the repository:

git clone https://github.com/yourname/I18nForgeX.git

Open the project in Delphi and build the application.


⚙️ Configuration

Example configuration:

project_path = ./website
languages = en,fr,de,es
deepl_api_key = YOUR_API_KEY
output = translations.xlsx

📊 Example

HTML source

<button data-i18n="login.button">Login</button>
<h1 data-i18n="homepage.title">Welcome</h1>

Generated Excel

Key EN FR DE
login.button Login Connexion Anmeldung
homepage.title Welcome Bienvenue Willkommen

Generated JSON

en.json

{
  "login": {
    "button": "Login"
  },
  "homepage": {
    "title": "Welcome"
  }
}

🗺 Roadmap

Planned features:

  • Support for JS / TS files
  • Detection of unused translation keys
  • Detection of missing translation keys
  • CLI version
  • CI/CD integration
  • Additional export formats

🤝 Contributing

Contributions are welcome!

You can help by:

  • opening issues
  • suggesting improvements
  • submitting pull requests

📜 License

MIT License

About

Scan your code. Forge your translations. Generate your i18n files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages