models/LanguageTranslate.php
public static function getLanguageTranslateByIdAndLanguageId($id, $languageId)
    {
        $languageTranslate = self::findOne(['id' => $id, 'language' => $languageId]);
        if (!$languageTranslate) {
            $languageTranslate = new self([
                'id' => $id,
                'language' => $languageId,
            ]);
        }

        return $languageTranslate;
    }
public static function getLanguageTranslateByIdAndLanguageId($id, $languageId)
    {
        $languageTranslate = self::findOne(['id' => $id, 'language' => $languageId]);
        if (!$languageTranslate) {
            $languageTranslate = new self([
                'id' => $id,
                'language' => $languageId,
            ]);
        }

        return $languageTranslate;
    }
public static function getLanguageTranslateByIdAndLanguageId ( $ id , $ languageId ) { $ languageTranslate = self :: findOne ( [ 'id' => $ id , 'language' => $ languageId ] ) ; if ( ! $ languageTranslate ) { $ languageTranslate = new self ( [ 'id' => $ id , 'language' => $ languageId , ] ) ; } return $ languageTranslate ; }
Returnes language object by id and language_id. If not found, creates a new one.

@param int $id LanguageSource id
@param string $languageId Language language_id

@return LanguageTranslate

@deprecated since version 1.2.7
Returnes language object by id and language_id . If not found creates a new one .