Kainz
April 17, 2018, 11:02am
1
Hi I am trying to make a funcktion in the email_template app that inserts some body text if the user/session is eng. and another body text if the user/session is danish…how do i detect the language
Rello
April 17, 2018, 4:02pm
2
Hey,
$languageCode = $this->configManager->getUserValue($userId, 'core', 'lang');
I used it here in the Audio Player to get the language of a user during occ execution
\OC::$server->getCache()->remove($progresskey);
$params = ['status' => 'stopped'];
$response = new JSONResponse($params);
return $response;
}
// check if scanner is started from web or occ
if ($userId !== null) {
$this->occ_job = true;
$this->userId = $userId;
$languageCode = $this->configManager->getUserValue($userId, 'core', 'lang');
$this->l10n = $this->languageFactory->get('audioplayer', $languageCode);
}
$this->folderpicture = false;
$this->progresskey = $progresskey;
$this->parentId_prev = false;
$counter = 0;
$counter_new = 0;
$error_count = 0;
$duplicate_tracks = 0;