WPML has this great new feature where it saves your theme’s string translations to .mo files in the following location:
The problem is, the languages folder gets rebuild on every Trellis deploy with the composer install task. This results in missing string translations in my theme on the frontend after each deployment. When I login, and save a string translation in WPML, the .mo files are re-generated and my string translations are back on the frontend.
Since these translations are user generated and environment specific, I can’t put them in version control or keep them in sync locally.
I checked if there is a WPML filter available to change the default location where these .mo files are saved, so I can move them to the shared uploads folder, but there isn’t. There are also no WP-CLI commands available for WPML so I can add it to the playbook
So what would be the easiest fool proof way to copy these .mo files over from the current release folder to the new one? Which
deploy_helper variables are available in the
deploy_after deploy hooks?
Any help is appreciated!