public function available_translations($translations)
{
// Bail if disabled.
if (!$this->enabled()) {
return $translations;
}
/**
* If transient still contains list of languages just use those.
* Otherwise fallback to mimicked data which we create here.
*/
if ($translations && !empty($translations)) {
return $translations;
} else {
$installed_languages = get_available_languages();
return $this->get_offline_languages($installed_languages);
}
}