static public function fetchCustomCondsSQL( $params, $mainTranslation = false, $locale = false )
    {
        $customConds = is_array( $params ) && !empty( $params ) ? " AND " : " WHERE ";
        $customConds .= " eztags.id = eztags_keyword.keyword_id ";

        if ( $mainTranslation !== false )
        {
            $customConds .= " AND eztags.main_language_id + MOD( eztags.language_mask, 2 ) = eztags_keyword.language_id ";
        }
        else if ( is_string( $locale ) )
        {
            $db = eZDB::instance();
            $customConds .= " AND " . eZContentLanguage::languagesSQLFilter( 'eztags' ) . " ";
            $customConds .= " AND eztags_keyword.locale = '" . $db->escapeString( $locale ) . "' ";
        }
        else
        {
            $customConds .= " AND " . eZContentLanguage::languagesSQLFilter( 'eztags' ) . " ";
            $customConds .= " AND " . eZContentLanguage::sqlFilter( 'eztags_keyword', 'eztags' ) . " ";
        }

        return $customConds;
    }