private function ensureTranslationsLoaded($language)
{
if (!isset($GLOBALS['_ELGG']->translations)) {
// this means we probably had an exception before translations were initialized
$this->registerTranslations($this->defaultPath);
}
if (!isset($GLOBALS['_ELGG']->translations[$language])) {
// The language being requested is not the same as the language of the
// logged in user, so we will have to load it separately. (Most likely
// we're sending a notification and the recipient is using a different
// language than the logged in user.)
$this->loadTranslations($language);
}
}