common/components/SetLanguage.php
/*
     * json for common words in static page
     */
json for common words in static page
json for common words in static page
public static function Words($language) {
        if ($language == 'ar') {
        $path = Yii::getAlias('@words') . '/components/arabic-words.json';
        } else{
            $path = Yii::getAlias('@words') . '/components/english-words.json';
        }
        $str = file_get_contents($path);
        $json = json_decode($str, true);
        return $json;
    }
public static function Words ( $ language ) { if ( $ language == 'ar' ) { $ path = Yii :: getAlias ( '@words' ) . '/components/arabic-words.json' ; } else { $ path = Yii :: getAlias ( '@words' ) . '/components/english-words.json' ; } $ str = file_get_contents ( $ path ) ; $ json = json_decode ( $ str , true ) ; return $ json ; }
json for common words in static page
json for common words in static page