1. Go to this page and download the library: Download raffaelj/cockpit-babel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
raffaelj / cockpit-babel example snippets
return [
'app.name' => 'My app',
// set entry level languages in cockpit cms v1// use the gui instead to change locales in cockpit cms v2'i18n' => 'de',
'languages' => [
'default' => 'Deutsch',
'fr' => 'Francais',
],
// set admin ui languages'babel' => [
'languages' => [
'de' => 'Deutsch',
'fr' => 'Francais',
],
],
];