Hello,
I access now the current language info with the following code:
$languages_code = array_column( c::get('languages'), 'code' );
$languages_pos = array_search( $site->language()->code(), $languages_code );
$language_info = c::get('languages')[$languages_pos];
This works perfect. Maybe there is a better/faster solution.
Also the check here works in my controllers\site.php
if (!$page->content()->exists()) {
...
}
Is there a way to set/overwrite the current content/page object in the controller?
Like:
$page->content('de'); // de = default
Thanks,
frank