> if I understand correctly, this will be called for each loaded resource, right ? But resources are not always for the current language, right ? Therefore I think you should check if this is a resource for the current language before trying to translate

It’s called for each resource, but the translation only happens once when the last resource is loaded.

> if I understand correctly (again) you need this function only if translationRequired is true

No. If the current document is already in the target locale (e.g. when the default locale is used), we don’t need to translate anything but we still have to load the l10n dictionary for all the content that is generated dynamically.

> (maybe for another bug) what happens if the user changes the language while it's loading ?

I have no idea. :-)
It’s difficult to prioritize such a patch in the current workflow, but if you open a bug about that I’ll have a look.