Download the PHP package nativemind/wp-translation without Composer
On this page you can find all versions of the php package nativemind/wp-translation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nativemind/wp-translation
More information about nativemind/wp-translation
Files in nativemind/wp-translation
Package wp-translation
Short Description Advanced WordPress translation plugin with Polylang integration, caching, and multisite support
License MIT
Homepage https://nativemind.net
Informations about the package wp-translation
NativeLang WordPress Plugin
Empowering Multilingual WordPress Sites with Advanced Translation Capabilities
NativeLang is a comprehensive WordPress plugin designed to significantly enhance your website's multilingual capabilities. Built as an advanced extension for the popular Polylang plugin, NativeLang adds powerful translation features, intelligent caching, and seamless multisite support that make it easier than ever to manage and deliver content in multiple languages.
๐ Key Features
Core Translation Features
- ๐ Automatic Content Translation: Real-time translation of posts, pages, titles, and widgets using Google Translate API
- ๐ฏ Smart Menu Translation: Automatic translation of navigation menus with emoji support and custom mappings
- ๐ง Intelligent Caching: Advanced caching system with automatic expiration and cleanup to reduce API calls
- ๐ Translation Quality Control: Built-in quality assessment with metrics and error handling
User Interface & Experience
- ๐ Language Switcher Widget: Customizable language switcher with flags, dropdowns, and multiple display options
- ๐จ Emoji Support: Rich emoji integration for enhanced visual language identification
- ๐ฑ Responsive Design: Mobile-optimized interface with accessibility features
- โก Real-time Updates: Live translation status with progress indicators
Advanced Features
- ๐ข Multisite Support: Full WordPress Multisite compatibility with domain mapping
- ๐ง Developer-Friendly: Extensive hooks, filters, and APIs for customization
- ๐ Performance Optimized: Minimal database queries with intelligent memory management
- ๐ก๏ธ Security Focused: Secure cache handling with proper sanitization and validation
Administrative Tools
- โ๏ธ Admin Dashboard: Comprehensive settings page with cache management and statistics
- ๐ Analytics: Detailed translation metrics and performance monitoring
- ๐ Bulk Operations: Mass cache clearing and translation management
- ๐งช Testing Suite: Built-in test framework for validation and debugging
๐ฆ Architecture Overview
NativeLang follows a modular architecture designed for performance, maintainability, and extensibility:
Core Components
- ๐๏ธ Main Plugin Class (
NativeMind): Singleton pattern with comprehensive hook management - ๐พ Cache System (
NativeMindCache): Advanced file-based caching with automatic cleanup - ๐ Internationalization (
i18n.php): Complete language support with Polylang integration - ๐ง Utility Functions (
functions.php): Helper functions for common operations - ๐ Multisite Support (
multisite/): Domain mapping and multi-language site management
Integration Points
- WordPress Core: Deep integration with WordPress hooks and filters
- Polylang Plugin: Seamless extension of Polylang's capabilities
- Google Translate API: Reliable translation service with fallback handling
- WordPress Multisite: Native support for network installations
๐ ๏ธ Installation & Setup
Prerequisites
- WordPress 5.0 or higher
- PHP 7.4 or higher
- Polylang plugin installed and activated
- Google Translate API key (for automatic translations)
Installation Methods
Via Composer (Recommended)
Manual Installation
-
Download Plugin Files:
-
Configure Polylang:
- Install and activate Polylang
- Set up your languages in Polylang settings
- Configure default language
-
Activate NativeLang:
- Go to WordPress Admin โ Plugins
- Activate "NativeMind Plugin"
-
Configure API Key:
Option 1: Environment Variable (Recommended)
Option 2: Copy Template File
- Multisite Setup (Optional):
๐ฏ Usage Guide
Basic Usage
Language Switcher
Add language switcher anywhere using:
Shortcode:
PHP Function:
Widget:
- Go to Appearance โ Widgets
- Add "NativeMind Language Switcher" widget
Menu Translation
- Create menus in WordPress as usual
- Use
#LANGUAGE#placeholder for current language display - Add emojis to menu items for visual enhancement
Advanced Configuration
Custom Translation Mappings
Cache Management
Multisite Domain Mapping
๐ง Developer API
Hooks and Filters
Actions
Filters
Custom Functions
Translation Quality Check
Browser Language Detection
Custom Flag Emojis
๐งช Testing
Test Suite
Run the comprehensive test suite:
Manual Testing Checklist
- [ ] Plugin activation without errors
- [ ] Polylang integration working
- [ ] Language switcher displays correctly
- [ ] Menu translations functional
- [ ] Cache operations working
- [ ] Admin dashboard accessible
- [ ] Multisite domain mapping (if applicable)
๐ Performance & Optimization
Caching Strategy
- File-based caching with automatic expiration (7 days default)
- Memory caching for repeated translations within single request
- Intelligent cache keys incorporating blog ID, network ID, and content hash
- Automatic cleanup via WordPress cron jobs
Performance Tips
- API Key Management: Use environment variables for API keys
- Cache Tuning: Adjust cache expiration based on content update frequency
- Selective Translation: Don't translate administrative content
- CDN Integration: Serve static assets via CDN for better performance
๐ก๏ธ Security Considerations
Data Protection
- All user input is properly sanitized and validated
- Cache files are protected with .htaccess rules
- API keys should be stored securely (not in version control)
- CSRF protection on all admin actions
Best Practices
- Regular cache cleanup to prevent disk space issues
- Monitor API usage to avoid quota limits
- Use HTTPS for all translation API calls
- Implement proper error handling and logging
๐ Troubleshooting
Common Issues
"Polylang not found" Error
Solution: Install and activate Polylang plugin first.
Translations Not Appearing
Possible Causes:
- Invalid Google Translate API key
- Network connectivity issues
- Cache directory permissions
- Polylang configuration incomplete
Debug Steps:
- Check API key validity
- Verify cache directory is writable
- Enable WordPress debug logging
- Run test suite for diagnostics
Language Switcher Not Displaying
Possible Causes:
- Theme conflicts
- CSS styling issues
- Polylang languages not configured
Solutions:
- Check browser console for errors
- Verify Polylang language setup
- Add custom CSS if needed
- Test with default theme
Debug Mode
Enable debug mode for detailed logging:
๐ค Contributing
We welcome contributions! Please see our GitHub repository for:
- Issue reporting
- Feature requests
- Pull request guidelines
- Development setup instructions
๐ License
This project is licensed under the MIT License - see the LICENSE.md file for details.
๐ Acknowledgments
- Polylang Team for the excellent multilingual foundation
- Google Translate for reliable translation services
- WordPress Community for the robust platform
- Contributors who help improve this plugin
๐ Support
- Documentation: nativemind.net
- Email Support: [email protected]
- Community Forum: WordPress.org Plugin Forum
- Professional Support: Available for enterprise implementations
Made with โค๏ธ by NativeMind.net | Part of the TaxLien.online project
All versions of wp-translation with dependencies
ext-json Version *
ext-curl Version *