[FEATURE] Improved translation handling for statement generation
When selecting items in a language other than default one, the
relations (e.g. for IRRE) can not be resolved correctly. This
fix adds the current language if handling is enabled for the chosen
table. Besides it corrects the ordering of items as it selects all
possible ones. For correct overlay the origin is fetched before.
Change-Id: Ibcfe83314c0f2fff54348d9ffab97cd7546779ca
Resolves: #32072
Resolves: #32216
Releases: 6.0
Reviewed-on: http://review.typo3.org/10188
Reviewed-by: Jochen Rau
Tested-by: Jochen Rau
Reviewed-by: Stefan Neufeind
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn