1. Go to this page and download the library: Download webard/nova-language-switch 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/ */
webard / nova-language-switch example snippets
// in app/Providers/NovaServiceProvider.php
// ...
public function tools()
{
return [
// ...
new \Badinansoft\LanguageSwitch\LanguageSwitch(),
];
}
return [
/**
* List of languages that your application supports
* array <string, string>
*/
'supported-languages' => [
'en' => 'English',
'ar' => 'Arabic',
//here you can add new language or remove language that you need by 'local'=>'Label'
],
/**
* Display language name in the language switcher
* bool
*/
'display-language-name' => true,
/**
* Languages That need RTL support
* string
*/
'rtl-languages' => [
'ar'
//here put that language that need support RTL just put local of the language like this example for arabic
],
];