widgets/NotificationsAsset.php
public static function getTimeAgoI18n($locale)
    {
        $pattern = 'locales/jquery.timeago.%s.js';

        $filename = sprintf($pattern, $locale);
        if (file_exists(Yii::getAlias(self::$assetsDirectory) . $filename)) {
            return $filename;
        } else { // try harder by shortening the locale
            $locale = substr($locale, 0, 2);
            $filename = sprintf($pattern, $locale);
            if (file_exists(Yii::getAlias(self::$assetsDirectory) . $filename)) {
                return $filename;
            }
        }
        return false;
    }
public static function getTimeAgoI18n($locale)
    {
        $pattern = 'locales/jquery.timeago.%s.js';

        $filename = sprintf($pattern, $locale);
        if (file_exists(Yii::getAlias(self::$assetsDirectory) . $filename)) {
            return $filename;
        } else { // try harder by shortening the locale
            $locale = substr($locale, 0, 2);
            $filename = sprintf($pattern, $locale);
            if (file_exists(Yii::getAlias(self::$assetsDirectory) . $filename)) {
                return $filename;
            }
        }
        return false;
    }
public static function getTimeAgoI18n ( $ locale ) { $ pattern = 'locales/jquery.timeago.%s.js' ; $ filename = sprintf ( $ pattern , $ locale ) ; if ( file_exists ( Yii :: getAlias ( self :: $ assetsDirectory ) . $ filename ) ) { return $ filename ; } else { // try harder by shortening the locale $ locale = substr ( $ locale , 0 , 2 ) ; $ filename = sprintf ( $ pattern , $ locale ) ; if ( file_exists ( Yii :: getAlias ( self :: $ assetsDirectory ) . $ filename ) ) { return $ filename ; } } return false ; }
Gets the jQuery timeago locale file based on the current Yii language

@return bool|string Returns the path to the locale file, or FALSE if
it does not exist.
Gets the jQuery timeago locale file based on the current Yii language