A modern, web-based XLIFF file editor with support for XLIFF 1.2 and XLZ (zipped XLIFF with skeleton) formats. Edit translation units while preserving XML tags and file structure.
- π Multiple Format Support: XLIFF 1.2 and XLZ (zipped with skeleton files)
- π Tag Protection: Edit translation text while keeping XML tags locked
- π² Structure Viewer: Visual tree representation of file hierarchy
- π Search & Filter: Quick search across all translation units
- π Statistics: View word counts, completion status, and file metrics
- π― Inline Tag Display: Visual representation of formatting tags
- πΎ Export: Download modified files in original format
- Python 3.9 or higher
- Node.js 16 or higher
- npm or yarn
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the server
uvicorn main:app --reloadBackend will be available at http://localhost:8000
cd frontend
# Install dependencies
npm install
# Start development server
npm run devFrontend will be available at http://localhost:5173 (or http://localhost:3000)
xliff-editor/
βββ backend/
β βββ main.py # FastAPI application
β βββ xliff_parser.py # XLIFF parsing logic
β βββ xlz_handler.py # XLZ format handler
β βββ requirements.txt # Python dependencies
β βββ README.md # Backend documentation
βββ frontend/
β βββ src/
β β βββ App.jsx # Main React component
β β βββ main.jsx # Application entry
β β βββ index.css # Tailwind CSS
β βββ package.json
β βββ README.md # Frontend documentation
βββ README.md # This file
- Click "Choose File" button
- Select an XLIFF (.xlf, .xliff) or XLZ file
- File structure appears in left panel
- Click file names to expand/collapse
- Click translation units to view details
- Use search box to filter units
- Select a translation unit
- Edit target text in the editor
- Tags are highlighted and protected
- Changes are tracked automatically
- Click "Export XLIFF" button
- File downloads in original format
- All tags and structure preserved
POST /api/upload
Content-Type: multipart/form-data
Response: {
"files": [...],
"stats": {...}
}GET /api/xliff/{file_id}
Response: {
"files": [...],
"stats": {...}
}PUT /api/xliff/{file_id}/files/{file_index}/trans-units/{tu_index}
Content-Type: application/json
{
"target": "Updated translation text with β¨tagsβ©"
}GET /api/export/{file_id}
Response: File download (XLIFF or XLZ)- FastAPI: Modern Python web framework
- lxml: Powerful XML processing
- uvicorn: ASGI server
- python-multipart: File upload handling
- React 18: UI framework
- Vite: Build tool and dev server
- Tailwind CSS: Utility-first CSS
- Lucide React: Icon library
- β Single and multi-file documents
- β Translation units with source/target
- β Inline tags (bpt, ept, ph, g, x, it)
- β Attributes preservation
- β Group nesting
- β File metadata
- β Skeleton file preservation
- β Content extraction and merging
- β ZIP archive handling
- β Multi-file support within archive
<bpt>/<ept>: Begin/End paired tags<ph>: Placeholder tags<g>: Generic grouping tags<x>: Standalone tags<it>: Isolated tags
- Upload: File received and stored in memory
- Detection: Automatic format detection (XLIFF vs XLZ)
- Parsing: XML parsing with namespace handling
- Tag Extraction: Inline tags converted to markers (β¨tagβ©)
- Structure Building: Hierarchical tree of files and units
- Storage: In-memory storage with unique file ID
Tags are extracted and replaced with visual markers:
- Original:
<g id="1">Hello</g> World <x id="2"/> - Displayed:
β¨g-1β©Helloβ¨/g-1β© World β¨x-2β© - Tags remain protected during editing
- Original XML structure preserved on export
# Install production server
pip install gunicorn
# Run with Gunicorn
gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000# Build for production
npm run build
# Serve with any static server
# Output in dist/ directoryComing soon! Full Docker and docker-compose setup.
cd backend
pytestcd frontend
npm test- XLIFF 2.0 support
- Database persistence (PostgreSQL)
- User authentication
- Real-time collaboration
- Translation memory integration
- Quality assurance checks
- Batch file processing
- Docker deployment
- Cloud storage integration
- Large files (>100MB) may cause performance issues
- Some complex XLIFF variants may not parse correctly
- In-memory storage means data loss on server restart
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
German - Senior Software Engineer
- 20+ years in software development
- Expert in localization engineering
- Based in Dublin, Ireland
- Built with modern Python and React patterns
- Inspired by professional CAT tools
- Designed for localization professionals
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check existing issues for solutions
- Review documentation in
/backend/README.mdand/frontend/README.md
Made with β€οΈ for the localization community