Download the PHP package centrust/nova-localization without Composer
On this page you can find all versions of the php package centrust/nova-localization. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download centrust/nova-localization
More information about centrust/nova-localization
Files in centrust/nova-localization
Package nova-localization
Short Description Laravel Nova Localization Package
License MIT
Homepage https://github.com/centrust/nova-localization
Informations about the package nova-localization
Laravel Nova Inline Arabic Localization (Translation)
This package is tailored for developers using Laravel Nova who need an easy, reliable solution for managing their application's translations.
Currently Only Supports English and Arabic languages.You are free to fork and add your own language support.
Features
- Inline Translation: Automatically translates your application's text from the dashboard.
- Flexibility: Designed to work seamlessly with Laravel's built-in localization functionality.
- Easiness: An easy configuration process ensures you can start using instantly.
Example Use
in Nova Resource
Result
- ِِArabic الأسم
- English Name
- ِِArabic التعريف
- English Description
Installation
You can install the package via composer:
You can publish and run the migrations with:
Once you Migrate the table, you need to add 'locale' column to your User Model fillable array.
You can publish the config file with:
This is the contents of the published config file:
Example for the CSS file that contains the Arabic font family.
Usage
To translate any text in your application, you can use the _tran() helepr function:
To show the Localization Resource in the menu, (I havent figured out how to show it automatically yet) but you can add it manually by Creating your own normal resource and extend this package resource
`
To have the user switch languages in the User menu, you can add this to your User Menu in the Novaserviceprovider.php
This part will switch the locale and to RTL if 'Arabic' is selected
How It works
- When you use the _tran() function, which is a global helper function, available in all your application's files,
- the package will search for the translation in the database,
- if it does not find it, it will search for it in the Laravel language files.
- If it does not find it in the language files, it will save it in the database and return it to you.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Salah Elabbar
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of nova-localization with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^10.0|^11.0
outl1ne/nova-inline-text-field Version ^2.0
spatie/nova-translatable Version ^3.1|^4.0
laravel/nova Version ^4.0