Laravel Translations

Published at 01 June 2022

If you like PHPFlasher please consider giving it a on github or by spreading the word on twitter. Your support allows me to keep this package up-to-date and maintainable. Thank you

PHPFlasher allows you to translate your notification messages, presets and automatically detect RTL support.

By default PHPFlasher came with Arabic, English and French translations, but you can add your own easily.

For example, if you need to override the English translation strings for PHPFlasher, you should place a language file at: lang/vendor/flasher/en/messages.php . Within this file, you should only define the translation strings you wish to override. Any translation strings you don’t override will still be loaded from the PHPFlasher’s original language files.

Here is the list of the default translation keys for PHPFlasher:

// resources/lang/vendor/flasher/ar/messages.php
return [
        'success' => 'نجاح',
        'error' => 'خطأ',
        'warning' => 'تحذير',
        'info' => 'معلومة',

        'The resource was created' => 'تم إنشاء :resource',
        'The resource was updated' => 'تم تعديل :resource',
        'The resource was saved' => 'تم حفظ :resource',
        'The resource was deleted' => 'تم حذف :resource',

        'resource' => 'الملف',

// resources/lang/vendor/flasher/en/messages.php
return [
    'success' => 'Success',
    'error' => 'Error',
    'warning' => 'Warning',
    'info' => 'Info',

    'The resource was created' => 'The :resource was created',
    'The resource was updated' => 'The :resource was updated',
    'The resource was saved' => 'The :resource was saved',
    'The resource was deleted' => 'The :resource was deleted',

    'resource' => 'resource',

// resources/lang/vendor/flasher/fr/messages.php
return [
        'success' => 'Succès',
        'error' => 'Erreur',
        'warning' => 'Avertissement',
        'info' => 'Information',

        'The resource was created' => 'La ressource :resource a été ajoutée',
        'The resource was updated' => 'La ressource :resource a été mise à jour',
        'The resource was saved' => 'La ressource :resource a été enregistrée',
        'The resource was deleted' => 'La ressource :resource a été supprimée',

        'resource' => '',

PHPFlasher is a project by Younes KHOUBZA.