็ฎไฝไธญๆ | English
A comprehensive internationalization (i18n) management platform designed to streamline the translation workflow for development teams, content creators, and localization specialists.
- Project Management: Organize translations by project for better workflow organization
- Multi-language Support: Manage translations for unlimited languages with customizable language settings
- Key-based Translation System: Maintain consistent translations across your application with a key-based approach
- Batch Operations: Import, export, and update translations in batch to save time
- Context Support: Add contextual information to improve translation accuracy
- Excel Import/Export: Support for standard formats to integrate with existing workflows
- RESTful API: Well-documented API for integration with your systems
- User Authentication: Secure JWT-based authentication system
- Responsive UI: Modern admin dashboard built with React and Ant Design
- CLI Integration: Command-line tool for seamless integration with your development workflow
i18n-flow consists of three main components:
- Admin Backend: Go-based API server that manages all i18n data and provides RESTful endpoints
- Admin Frontend: React-based dashboard for visual management of translation projects
- CLI Tool: Command-line interface for developers to sync translations with their codebase
- Go 1.20 or higher
- Node.js 18 or higher
- MySQL 8.0
- pnpm (preferred) or npm
-
Clone the repository:
git clone https://github.com/ilukemagic/i18n-flow.git cd i18n-flow/admin-backend
-
Configure your environment:
cp .env.example .env # Edit .env with your database credentials and other settings
-
Run the backend:
go mod download go run main.go
-
The API will be available at
http://localhost:8080
with Swagger documentation athttp://localhost:8080/swagger/index.html
-
Navigate to the frontend directory:
cd ../admin-frontend
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
The admin interface will be available at
http://localhost:5173
-
Install the CLI tool globally:
npm install -g i18n-flow-cli
-
Initialize i18n-flow in your project:
i18n-flow init
-
Follow the interactive setup to configure your project with i18n-flow.
You can easily deploy i18n-flow using Docker and Docker Compose.
- Docker 20.10+
- Docker Compose v2+
-
Clone the repository:
git clone https://github.com/ilukemagic/i18n-flow.git cd i18n-flow
-
Configure environment variables:
cp .env.example .env
Edit the
.env
file to set:- Database credentials
- JWT secrets
- API keys
- Other configuration options
-
Start the services:
docker compose up -d
This will start three services:
- MySQL database on port 3306
- Backend API on port 8080
- Frontend admin panel on port 80
-
Access the application:
- Admin interface: http://localhost
- API & Swagger docs: http://localhost/swagger/index.html
-
Initial login:
- Username:
admin
- Password:
admin123
- Important: Change the default password after first login!
- Username:
The default docker-compose.yml
includes:
- Database: MySQL 8.0 with data persistence through Docker volumes
- Backend: Go 1.23 API server with MySQL connection
- Frontend: React SPA served through Nginx with API proxying
You can adjust the deployment by:
- Modifying environment variables in the
.env
file - Changing port mappings in
docker-compose.yml
- Updating Docker build contexts or volumes as needed
To update to a new version:
git pull
docker compose down
docker compose up -d --build
- Database connection issues: Check your DB credentials in the
.env
file - Frontend not loading: Verify the nginx proxy configuration is correctly pointing to the backend
- Backend not starting: Check the backend logs with
docker compose logs backend
The i18n Flow documentation is available as a dedicated website:
- URL: When deployed via Docker, access at
http://localhost:8000/en/
- Languages: Available in both English and Chinese
- Content:
- Comprehensive guides for all components
- Installation and setup instructions
- Usage tutorials with practical examples
- API reference documentation
- Deployment guides
Access specific language versions:
- English:
http://localhost:8000/en/
- Chinese:
http://localhost:8000/zh/
The API documentation is available via Swagger UI when running the backend server:
- Open
http://localhost:8080/swagger/index.html
in your browser
The admin dashboard provides an intuitive interface for:
- Managing projects and their translation keys
- Adding and updating language definitions
- Entering and editing translations
- Importing and exporting translations in various formats
- User management and access control
- Monitoring translation status and progress
The CLI tool provides the following commands:
init
: Initialize i18n-flow in your projectsync
: Sync translations from the server to your local projectpush
: Push translation keys to the serverstatus
: Check translation status for your project
Full CLI documentation is available by running i18n-flow --help
.
i18n-flow is built with a modern tech stack and follows a clean architecture approach:
- Language: Go
- Framework: Gin
- Database: MySQL with GORM ORM
- Authentication: JWT & API keys
- Documentation: Swagger/OpenAPI
- Language: TypeScript
- Framework: React 19
- UI Library: Ant Design 5
- State Management: React Context API
- Routing: React Router 7
- Styling: Tailwind CSS 4
- Build Tool: Vite
- Language: TypeScript/JavaScript
- Runtime: Node.js
- Distribution: npm package
The typical workflow in i18n-flow:
- Create a project through the admin dashboard
- Define languages you need to support
- Use the CLI to scan your source code for translation keys
- Push new keys to the translation server with
i18n-flow push --scan
- Translate keys through the admin dashboard
- Sync translations to your local project with
i18n-flow sync
- Update translations as needed
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Gin - HTTP web framework in Go
- GORM - ORM library for Go
- React - A JavaScript library for building user interfaces
- Ant Design - A design system for enterprise-level products
- Tailwind CSS - A utility-first CSS framework
- Vite - Next generation frontend build tool
Project Link: https://github.com/ilukemagic/i18n-flow
Made with โค๏ธ for better i18n workflows