I maintain several drupal 8 websites using the same instance. They all uses a custom module I developed.
I have a .po file containing the translations I need. I can import them using the admin interface and all is well.
How can I setup automatic import of the module .po file ? And trigger the update/import on all websites when the .po file is updated ? I've spent much time in the drupal 8 documentation to no luck, unfortunately.
I've tried putting the .po file in various location on the filesystem : modules/modulename/files/translations/ or sites/websitename/files/translations are not working. Even when I enable local translations and launch a manual translations update.
Thank you for your help!
Comments
Obviously, after posting this
Obviously, after posting this I've finally found a solution.
I post it here hoping the next me might find it useful.
I've used this drush plugin : https://github.com/dawehner/drush_language
Put the file in sites/all/drush/drush_language/
New findings
I've looked into this a little bit more after tstoeckler on GitHub told it should work using drupal 8 core locale update tools (https://github.com/drush-ops/drush/issues/139#issuecomment-215581536).
Indeed, it works. What is needed though :
project: projectnameprojectname-0.1.fr.posites/sitename/files/translations. It does not work anywhere else (module directory or sites/all/translations in particular)The module project name part is very hard to find out. Everything works, no error message or problem anywhere apart from the fact that translations are not found.
Finding this all by yourself by experimenting is tedious and feels it should be way more easier. No documentation about that anywhere I've looked for. Hoping again this post will help other people save time.
Official documentation
Hi gaboo
This docu will help you:
https://api.drupal.org/api/drupal/core%21modules%21locale%21locale.api.php/group/interface_translation_properties/8.2.x
It works in the module folder.