Localization (i18n) & Languages

Paymery includes a full localization (i18n) system for both the public website and the admin panel. You can control the default language globally from the admin settings, and optionally allow visitors and users to switch languages from the site header.

1) Set the Default Language (Admin Settings)

In the admin panel, go to Settings and locate the Lang option. This value defines the default language used across the entire system:

2) Enable Language Switcher (Optional)

Next to the language setting, you will find Language switcher. If enabled, visitors and users can change the site language from the header. The selected language is stored in the session.

Enable language switcher from Settings:

Language switcher setting in admin panel

When enabled, users will see a language switcher in the header:

Language switcher in the website header

3) Supported Languages & RTL/LTR

Paymery ships with:

Arabic is fully supported with RTL direction, ensuring the UI components and layout render properly for Arabic users.

4) Where Translations Live

All translation files are stored in:

resources/lang/en
resources/lang/ar

Each language folder contains translation files used by different parts of the system, such as:

5) Editing Existing Translations

To update a translation, simply edit the appropriate file inside the target language folder. For example:

6) Adding a New Language (Example: French)

You can add a new language by creating a new language folder (for example fr) and translating the existing keys.

Step A: Create the language folder

resources/lang/fr

Step B: Copy the default language files

Copy the translation files from resources/lang/en into resources/lang/fr, then translate the values (keep keys unchanged).

Make sure these files exist in the new folder:

Step C: Register the language in config/i18n

After adding the translation folder, you must enable the language in:

config/i18n.php

Add your new locale under supported_locales (including direction):

Supported locales configuration (config/i18n.php)

Example structure:

'supported_locales' => [
    'en' => ['name' => 'English', 'native' => 'English', 'dir' => 'ltr'],
    'ar' => ['name' => 'Arabic',  'native' => 'العربية', 'dir' => 'rtl'],
    'fr' => ['name' => 'French',  'native' => 'Français', 'dir' => 'ltr'],
],

7) Translating Text in Blade

Paymery uses a translation helper function to render translated strings in Blade. Example:

{{ t('public.landing.features.items.invoices_title') }}

This reads the translation key from your language files (e.g. public.php) based on the currently active language.

Notes

paymery — Multi-Lang