SELECT
	x1.concept_id AS concept_id,
	x2.value AS language_from,
	x1.value AS value_from,
	y2.value AS language_to,
	y1.value AS value_to
FROM
	concept_translations AS x1
	INNER JOIN languages AS x2 ON (x1.language_id = x2.id)
	INNER JOIN concept_translations AS y1 ON ((x1.id <> y1.id) AND (x1.concept_id = y1.concept_id))
	INNER JOIN languages AS y2 ON (y1.language_id = y2.id)
WHERE
	(
		(
			(:language_from = '_')
			OR
			(x2.value = :language_from)
		)
		AND
		(
			(:language_to = '_')
			OR
			(y2.value = :language_to)
		)
		AND
		(x1.value LIKE :part)
	)
;

