yes multi language and line 55 is the route.
<?php
/*
---------------------------------------
License Setup
---------------------------------------
Please add your license key, which you've received
via email after purchasing Kirby on http://getkirby.com/buy
It is not permitted to run a public website without a
valid license key. Please read the End User License Agreement
for more information: http://getkirby.com/license
*/
c::set('languages', array(
array(
'code' => 'en',
'name' => 'EN',
'default' => true,
'locale' => 'en_US',
'url' => '/',
),
array(
'code' => 'de',
'name' => 'DE',
'locale' => 'de_DE',
'url' => '/de',
),
));
c::set('language.detect', true);
c::set('license', 'K2-PERSONAL-1f6080201f042643712274c4dfb70798');
c::set('cache', true);
c::set('debug', true);
c::set('panel.stylesheet', 'assets/css/panel.css');
c::set('routes', array(
array(
'pattern' => '(:any)/cv-template-no-1',
'action' => function($uid) {
$page = page($uid);
site()->visit('/' . $uid);
tpl::$data = array_merge(tpl::$data, array(
'kirby' => kirby(),
'site' => site(),
'pages' => pages(),
'page' => page()
), $page->templateData());
echo tpl::load(kirby()->roots()->templates() . DS . 'cv-template-no-1.php');
return false;
}
)
));
// c::set('panel.session.timeout', 10000);
s::$timeout = 60*24*30; // thirty days of session validity like in the Panel
s::$cookie['lifetime'] = 9999999; // don't let the cookie ever expire
// c::set('panel.session.timeout', 60*24*30);
// c::set('panel.session.lifetime', 60*24*30);
// GD Lib (default)
#c::set('thumbs.driver', 'gd');
// ImageMagick
c::set('thumbs.driver', 'im');
// plugin
// maps
c::set('map.key', 'AIzaSyCCQjEHFbkQk4tHdj_2fmbqWo2Z6v22fWg');
// focus
c::set('thumbs.driver', 'focus');
// c::set('panel.language', 'en');
c::set('plugin.logic.field', function($field, $page) {
return snippet('logic-aboutv2.1', ['field' => $field, 'page' => $page], true);
});
// return snippet('logic-' . $page->intendedTemplate(), ['field' => $field, 'page' => $page], true);
// Copy this code into your config.php file
// Replace the default $maxDimension to meet your needs
// Read more about Kirby's Panel hooks at https://getkirby.com/docs/panel/developers/hooks
// Shrink large images on upload
kirby()->hook('panel.file.upload', 'shrinkImage');
kirby()->hook('panel.file.replace', 'shrinkImage');
function shrinkImage($file, $maxDimension = 4000) {
try {
if ($file->type() == 'image' and ($file->width() > $maxDimension or $file->height() > $maxDimension)) {
// Get original file path
$originalPath = $file->dir().'/'.$file->filename();
// Create a thumb and get its path
$resized = $file->resize($maxDimension,$maxDimension);
$resizedPath = $resized->dir().'/'.$resized->filename();
// Replace the original file with the resized one
copy($resizedPath, $originalPath);
unlink($resizedPath);
}
} catch(Exception $e) {
return response::error($e->getMessage());
}
}