/** * @param int $applicationId * @return ApplicationLocalized */ public static function buildLocalizedApplicationByApplication($applicationId) { if( !$applicationId ) return null; $applicationName = CacheApplicationTool::getValue('applicationNameById', $applicationId); if ( is_null($applicationName) ) { $localizedApplication = ApplicationLocalized::getLocalizedApplicationByApplication($applicationId); if ( $localizedApplication instanceof ApplicationLocalized ) { self::buildCache($localizedApplication); return $localizedApplication; } else { return null; } } else { return self::buildLocalizedApplication($applicationName); } }