1. Go to this page and download the library: Download ixudra/translation library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Translate the message in the app default locale
Translate::message('your.key.goes.here');
// Translate the message in a given locale
Translate::message('your.key.goes.here', $locale);
// Translate the message in the app default locale
Translate::model('user.create.success');
// Translate the message in a given locale
Translate::model('user.create.success', $locale);
// Translate the message in the app default locale
Translate::recursive('admin.menu.title.new', array('model' => 'user'));
// Translate the message and keep the first character as lowercase (changed to uppercase by default)
Translate::recursive('admin.menu.title.new', array('model' => 'user'), false);
// Translate the message in a given locale
Translate::recursive('admin.menu.title.new', array('model' => 'user'), true, $locale);
// Publish all resources from all packages
php artisan vendor:publish
// Publish only the resources of the package
php artisan vendor:publish --provider="Ixudra\\Translation\\TranslationServiceProvider"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.