Closed tersor closed 4 years ago
Hi there, and thanks for the kind words!
I agree, translation would be great, and not something that was considered initially. I think for now, your best bet is to copy the mustache template and translate it in the copy. Then you can pass the alternate template as an argument to wp login email <user> --template=<path-to-template-file>
.
You can update the default by setting this in your wp-cli.yml
or global config file like so
login email:
template: path/to/alternate/template.mustache
Let me know if/how that works for you or if you have any other questions or suggestions.
Yes, the email body can be translated like you describe, works great! But how about the email subject?
Oh! My mistake. You're right, there's currently no way to translate that. How about a new parameter to the email
command?
Would this work for you?
wp login email <user> --subject='Alternate subject for login to {{domain}}' --template=...
That would work perfect!
Great! I'll plan on adding this soon unless you'd like to submit a PR yourself?
Sure, I can try to submit a PR, thanks!
Hello.
What a great plugin this is! It would have been nice to be able to translate the email, especially the subject field. Probably not necessary for the mustache template, huh?