There are several aspects to be considered here. The first situation is the general obligation of confessing grave sins. This is addressed in Canon Law, No. 960:
“Individual and integral confession and absolution constitute the only ordinary means by which a member of the faithful conscious of grave sin is reconciled with God and the Church. Only physical or moral impossibility excuses from confession of this type; in such a case reconciliation can be obtained by other means.”
The lack of a common language between penitent and confessor would enter into the category of a “physical or moral impossibility” which would excuse either the obligation of confession or its integrity, and allow for reconciliation to be obtained by other means.
In the present case we would be dealing with the confessor making a prudential judgment that the penitent is excused in virtue of a physical and moral impossibility and presuming the latter’s sincerity in manifesting those sins confessed in his native language.
Thus in this particular situation the sacrament would be valid.