protected function createClient($site, $resource, $lang)
{
$aimeos = $this->get('aimeos')->get();
$templatePaths = $aimeos->getCustomPaths('admin/jsonadm/templates');
$context = $this->get('aimeos_context')->get(false, 'backend');
$context->setI18n($this->get('aimeos_i18n')->get(array($lang, 'en')));
$context->setLocale($this->get('aimeos_locale')->getBackend($context, $site));
$view = $this->get('aimeos_view')->create($context, $templatePaths, $lang);
$context->setView($view);
return \Aimeos\Admin\JsonAdm\Factory::createClient($context, $templatePaths, $resource);
}