protected function registerLocale()
    {
        $lang = $this->prepareLang();
        if (file_exists(Yii::getAlias($this->getAssetBundle()->sourcePath) . DIRECTORY_SEPARATOR . "locales" . DIRECTORY_SEPARATOR . "jquery.timeago.{$lang}.js")) {
            $this->getAssetBundle()->js[] = "locales/jquery.timeago.{$lang}.js";
        } else {
            throw new InvalidConfigException("Language '{$lang}' do not exist.");
        }
    }