Language Synchronization Guide β
Critical Post-Installation Step
After creating your payment gateway module, you must synchronize the new translation keys with the system's language management infrastructure to ensure proper functionality.
Overview β
This guide covers the essential language synchronization steps required after creating your payment gateway module to ensure proper translation functionality across admin and tenant interfaces.
Language Synchronization β
Critical Requirement
Skipping language synchronization will result in missing translations and untranslated interface elements. This step is essential for proper module operation.
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:
Language Files Structure:
Modules/YourModule/resources/lang/
en.json # Admin-side translations
tenant_en.json # Tenant-side translationsAdmin Translations (en.json):
{
"Payment Gateway": "Payment Gateway",
"Gateway Settings": "Gateway Settings",
"API Configuration": "API Configuration",
"Test Mode": "Test Mode"
}Tenant Translations (tenant_en.json):
{
"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.jsonfiles 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:clearExpected Output:
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:clearafter synchronization
Next Steps β
- Advanced Topics - Explore webhooks, error handling, and logging for payment gateways
This guide is for WhatsMarkSaaS v2.0.0+ payment gateway development.