Skip to content

Commit

Permalink
Set language in JQAdm locale for translations
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Jul 4, 2024
1 parent 029dd2f commit 79f85df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/JqadmController.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ protected function createAdmin() : \Aimeos\Admin\JQAdm\Iface

$context = app( 'aimeos.context' )->get( false, 'backend' );
$context->setI18n( app( 'aimeos.i18n' )->get( array( $lang, 'en' ) ) );
$context->setLocale( app( 'aimeos.locale' )->getBackend( $context, $site ) );
$context->setLocale( app( 'aimeos.locale' )->getBackend( $context, $site )->setLanguageId( $lang ) );

$siteManager = \Aimeos\MShop::create( $context, 'locale/site');
$context->config()->apply( $siteManager->find( $site )->getConfig() );

$paths = $aimeos->getTemplatePaths( 'admin/jqadm/templates', $context->locale()->getSiteItem()->getTheme() );
$paths = $aimeos->getTemplatePaths( 'admin/jqadm/templates', $context->locale()->getSiteItem()->getTheme() );
$view = app( 'aimeos.view' )->create( $context, $paths, $lang );

$view->aimeosType = 'Laravel';
Expand Down

0 comments on commit 79f85df

Please sign in to comment.