1

I have a Drupal 8 custom module (custom_module) and a custom_module-8.x-1.0.da.po file I added to sites/default/files/translations, but my translations are not getting Imported during the module installation, even though translations are available for import in admin/reports/translations. Am I missing any step?

I don't want to put my custom_module-8.x-1.0.da.po file in sites/default/files/translations; I prefer it to be inside the module directory, if possible.

  • Have you added interface translation project and interface translation server pattern definitions to custom_module.info.yml? You might find useful info here – Oana Hulpoi Jun 28 '16 at 12:06
  • You can use a custom path for your translation file by setting the interface translation server pattern to whatever you want. – Oana Hulpoi Jun 28 '16 at 12:12
3

Add interface translation project and interface translation server pattern definitions to custom_module.info.yml. You can use a custom path for your translation po file by setting the interface translation server pattern to whatever you want.

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.