Language Synchronization Guide
This guide covers the essential language synchronization step required after creating your payment gateway module to ensure proper translation functionality.
After creating your payment gateway module, you must synchronize the new translation keys with the system's language management infrastructure to ensure proper functionality.
Critical Post-Installation Step Required
Skipping language synchronization will result in missing translations and untranslated interface elements. This step is essential for proper module operation.
Language Synchronization
Understanding Language Synchronization
When you create a new module with custom language files (tenant_en.json
and en.json
), the system needs to synchronize these new translation keys with the existing language management system.
Why Synchronization is Required
- Separate Language Systems: Admin and tenant language systems maintain separate translation caches
- Translation Indexing: Language files are indexed for the translation management interface
- Cache Integration: New translations need to be integrated with existing cached translations
Module Language File Structure
Your module includes two main translation files:
Modules/YourModule/resources/lang/
├── 📄 en.json # Admin-side translations
└── 📄 tenant_en.json # Tenant-side translations
{
"Payment Gateway": "Payment Gateway",
"Gateway Settings": "Gateway Settings",
"API Configuration": "API Configuration",
"Test Mode": "Test Mode"
}
{
"Pay with Gateway": "Pay with Gateway",
"Payment Processing": "Payment Processing",
"Secure Payment": "Secure Payment",
"Transaction Complete": "Transaction Complete"
}
Admin Side Language Sync
Purpose: Synchronize admin-facing translations from your module
Admin Language Sync Process
This synchronizes translations that appear in the admin interface, including gateway configuration, settings pages, and administrative messages.
Steps to Follow:
Login to Admin Panel
- Access your admin dashboard
- Ensure you have administrative privileges
Navigate to Setup Menu
- Go to Setup → Languages
- You'll see the language management interface
Sync Languages
- Click on the "Sync" button
- This will scan all modules for new translation keys
- Wait for the synchronization process to complete
What Happens During Admin Sync
- File Scanning: Scans
en.json
files from all active modules - Cache Update: Updates translation cache for admin interface
- Key Registration: Makes new translations available in admin language settings
- Interface Integration: New keys become available for translation management
Tenant Side Language Sync
Purpose: Synchronize tenant-facing translations from your module
You have two methods to sync tenant languages:
Method 1: Admin Side Sync (Recommended)
Best for: Managing all tenant translations from admin panel
Stay in Admin Panel
- Navigate to Setup → Tenant Languages
- This manages tenant-side translations from admin
Sync Tenant Languages
- Click on the "Sync" button
- This will scan all modules for tenant translation keys
- Wait for the synchronization process to complete
Why This Method is Recommended
- Centralized management from admin panel
- Applies to all tenants simultaneously
- No need to access individual tenant accounts
- Consistent synchronization across the platform
Method 2: Individual Tenant Sync
Best for: Tenant-specific language customization
Access Tenant Dashboard
- Login to a specific tenant account
- Navigate to tenant's setup menu
Navigate to Languages
- Go to Setup → Languages (tenant side)
- This is the tenant's own language management
Sync Languages
- Click on the "Sync" button
- This will sync translations for this specific tenant
- Repeat for each tenant if needed
Individual Tenant Limitations
- Must be repeated for each tenant
- Time-consuming for multiple tenants
- Potential for inconsistent synchronization
- Use only when tenant-specific customization is needed
Clear Cache After Language Synchronization
After completing the language synchronization process, it's essential to clear the application cache to ensure the new translations take effect immediately:
php artisan cache:clear
Application cache cleared!
Configuration cache cleared!
Route cache cleared!
View cache cleared!
Compiled views cleared!
Why Cache Clearing is Required
After language synchronization, cached translation data may contain outdated information. Clearing the cache ensures that your new translations are immediately available throughout the application.
Summary
Following this language synchronization guide ensures your payment gateway module's translations are properly integrated with the WhatsmarkSaaS platform. Remember to complete both admin and tenant language synchronization, and always clear the cache afterward to ensure your translations take effect immediately.
Key Steps Recap
- Admin Language Sync: Navigate to Setup → Languages → Click "Sync"
- Tenant Language Sync: Navigate to Setup → Tenant Languages → Click "Sync" (recommended method)
- Clear Cache: Run
php artisan cache:clear
after synchronization