Beartropy Permissions
Publish Translations
Translations will be published to lang/vendor/beartropy-permissions/.
1php artisan vendor:publish --tag=beartropy-permissions-lang
Translation Structure
The default structure includes English and Spanish:
1lang/vendor/beartropy-permissions/2├── en/3│ └── messages.php4└── es/5 └── messages.php
Adding More Languages
To add a new language, create a new directory with the language code and copy the messages.php file:
1# Example: Adding French2mkdir -p lang/vendor/beartropy-permissions/fr3cp lang/vendor/beartropy-permissions/en/messages.php lang/vendor/beartropy-permissions/fr/
Then translate the strings in the new file.
Setting the Locale
Make sure your application locale is set correctly in config/app.php:
1// config/app.php2'locale' => 'es', // or 'en'