Directus Translation Manager Extension
A powerful and modern translation management module for Directus CMS with Excel-like inline editing capabilities.
๐ Features
โจ Core Features
- Excel-like Inline Editing: Double-click any cell to edit directly in the table
- Real-time Search: Search translation keys with instant filtering
- Multi-language Support: Manage translations for multiple languages simultaneously
- Server-side Pagination: Efficient handling of large translation datasets
- Batch Save: Collect multiple changes and save them all at once
- Modern UI: Clean, professional interface following Directus design patterns
๐ฏ Advanced Features
- Dynamic Language Loading: Automatically loads available languages from your Directus instance
- Alphabetical Sorting: Translation keys are automatically sorted A-Z
- Visual Change Indicators: Modified cells are highlighted for easy identification
- Responsive Design: Works seamlessly on desktop and mobile devices
- Keyboard Navigation: Full keyboard support for efficient editing
๐ฆ Installation
npm install directus-extension-translation
๐ง Setup
- Install the extension in your Directus project
- Build the extension:
pnpm run build
- Restart your Directus instance to load the new extension
- Access the module via the navigation menu in your Directus admin panel
๐ฎ Usage
Basic Translation Management
- Navigate to “Translation Manager” in your Directus admin panel
- Select the languages you want to work with using the checkboxes
- Use the search box to filter translation keys
- Double-click any cell to edit translations inline
- Click “Save All Changes” to commit your modifications
Search and Filter
- Search Box: Type to filter translation keys in real-time
- Language Selection: Check/uncheck languages to show/hide columns
- Pagination: Navigate through large datasets efficiently
Inline Editing
- Double-click: Activate inline editing for any cell
- Enter: Save changes and move to next cell
- Escape: Cancel editing without saving
- Tab: Navigate between cells
๐ ๏ธ Technical Details
API Integration
- Endpoint:
/translations
for data retrieval and updates - Search: Real-time filtering via API parameters
- Pagination: Server-side pagination with 50 items per page
- Authentication: Inherits Directus session management
Architecture
- Framework: Vue.js 3 with Composition API
- Styling: SCSS with Directus design system variables
- Build: Directus Extension SDK
- TypeScript: Full type safety and IntelliSense support
๐ Requirements
- Directus 10.10.0 or higher
- Node.js 18+
- Modern web browser with ES6+ support
๐ Development
# Install dependencies
pnpm install
# Development mode with hot reload
pnpm run dev
# Build for production
pnpm run build
# Validate extension
pnpm run validate
๐จ Customization
The extension uses Directus design tokens and can be customized via CSS variables:
// Custom styling example
.translation-manager {
--theme--primary: #your-color;
--theme--background: #your-bg;
}
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
๐ License
MIT License - see LICENSE file for details
๐ Support
For issues and feature requests, please create an issue in the repository.
Built with โค๏ธ for the Directus community