---
url: >-
  https://docs.corbitaltech.dev/products/whatsmark-saas/customization/payment-gateway/language-synchronization.md
description: >-
  Essential language synchronization steps after creating payment gateway
  modules in WhatsMarkSaaS
---

# Language Synchronization Guide

::: warning 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 {#language-sync-overview}

::: danger 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.

::: warning 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:**

```text
Modules/YourModule/resources/lang/
  en.json          # Admin-side translations
  tenant_en.json   # Tenant-side translations
```

**Admin Translations (en.json):**

```json
{
  "Payment Gateway": "Payment Gateway",
  "Gateway Settings": "Gateway Settings",
  "API Configuration": "API Configuration",
  "Test Mode": "Test Mode"
}
```

**Tenant Translations (tenant_en.json):**

```json
{
  "Pay with Gateway": "Pay with Gateway",
  "Payment Processing": "Payment Processing",
  "Secure Payment": "Secure Payment",
  "Transaction Complete": "Transaction Complete"
}
```

### Admin Side Language Sync {#admin-language-sync}

**Purpose**: Synchronize admin-facing translations from your module

::: tip Admin Language Sync Process
This synchronizes translations that appear in the admin interface, including gateway configuration, settings pages, and administrative messages.
:::

**Steps to Follow:**

1. **Login to Admin Panel**

   * Access your admin dashboard
   * Ensure you have administrative privileges

2. **Navigate to Setup Menu**

   * Go to **Setup** → **Languages**
   * You'll see the language management interface

3. **Sync Languages**
   * Click on the **"Sync"** button
   * This will scan all modules for new translation keys
   * Wait for the synchronization process to complete

::: details 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 {#tenant-language-sync}

**Purpose**: Synchronize tenant-facing translations from your module

You have **two methods** to sync tenant languages:

### Method 1: Admin Side Sync (Recommended) {#method-admin-sync}

**Best for**: Managing all tenant translations from admin panel

1. **Stay in Admin Panel**

   * Navigate to **Setup** → **Tenant Languages**
   * This manages tenant-side translations from admin

2. **Sync Tenant Languages**
   * Click on the **"Sync"** button
   * This will scan all modules for tenant translation keys
   * Wait for the synchronization process to complete

::: tip 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 {#method-tenant-sync}

**Best for**: Tenant-specific language customization

1. **Access Tenant Dashboard**

   * Login to a specific tenant account
   * Navigate to tenant's setup menu

2. **Navigate to Languages**

   * Go to **Setup** → **Languages** (tenant side)
   * This is the tenant's own language management

3. **Sync Languages**
   * Click on the **"Sync"** button
   * This will sync translations for this specific tenant
   * Repeat for each tenant if needed

::: warning 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 {#clear-cache}

After completing the language synchronization process, it's essential to clear the application cache to ensure the new translations take effect immediately:

```bash
php artisan cache:clear
```

**Expected Output:**

```text
Application cache cleared!
Configuration cache cleared!
Route cache cleared!
View cache cleared!
Compiled views cleared!
```

::: tip 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 {#summary-recap}

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 {#key-steps}

1. **Admin Language Sync**: Navigate to Setup → Languages → Click "Sync"
2. **Tenant Language Sync**: Navigate to Setup → Tenant Languages → Click "Sync" (recommended method)
3. **Clear Cache**: Run `php artisan cache:clear` after synchronization

## Next Steps

* **[Advanced Topics](./advanced-topics.md)** - Explore webhooks, error handling, and logging for payment gateways

***

*This guide is for WhatsMarkSaaS v2.0.0+ payment gateway development.*
