After I added a language, and set as default language, I get this error.

Error: Call to undefined function locale_translation_use_remote_source() in install_import_translations()

I didn't enable the Locale module yet. I enabled only the Language module.

What do I have to do?

  • Have you tried to enable the Locale module as well? Does the error persist? – leymannx Dec 18 '18 at 8:58
  • I'm voting to close this question as off-topic because if this really is a reproducible problem it's a bug that should be reported on drupal.org here drupal.org/project/issues/drupal – leymannx Dec 18 '18 at 9:00

The error is caused from the fact install_import_translations() is calling a function that is provided from the Locale module (locale_translation_use_remote_source()), but since that module is not installed, the function is not found.

The Language module doesn't have the Locale module as dependency, so installing the first doesn't install the second. The opposite is true: One of the dependencies of the Locale module is the Language module.

I cannot say if this is caused by a bug on Drupal core that doesn't check the Locale module is installed before calling one of its functions, but installing the Locale module would resolve the issue. Once the Locale module is installed, Drupal will be able to find its functions, and you won't see that error again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.