dartrax
Forum Replies Created
-
Hi @chronofactum,
what’s the exact step you’re struggling with?Hi @alexprs7 ,
only the code from the Github gist goes to the functions.php.The code that I posted in my recent reply to you (with the conditional shortcode [trp_language language=”…”]) goes into the mail settings in the admin area. For example, in the ?additional content“ value of the mail settings.
Please let me know if you don‘t know where/what I mean, I can post a screenshot in a few days as I‘m on holiday and away from a pc right now.
Hi @alexprs7
I use this code:
https://gist.github.com/dartrax/85b3ab77b8210e92cc50e1b68de83c73With this additional code, the user language will be stored in the order metadata and the “out of order” emails will be sent in the correct language.
The definition of the translation is done via the ‘normal’ WordPress translation with .mo/.po-files. If you did not change the default settings or template for Mails, the translations are already there for you. There are only small pieces left, where the strings are set in the admin settings, like the “Additional content” setting. Here, you need to work with the conditional shortcode, for example:
[trp_language language="de_DE_formal"] Danke fürs Lesen. [/trp_language][trp_language language="en_US"] Thanks for reading. [/trp_language]
In addition, we are working on a tool to clean the database build up.
That sounds great!
Some time ago, I had some thoughts on about how a cleaning procedure could work. I’m sure the TranslatePress devs already have something in mind, but I think it won’t hurt to post my idea:Feature Request #1
I assume, it should help to delete all the empty (= untranslated) rows from time to time. I’d like to see an “remove empty rows” next to the “remove duplicate rows”-feature. After that, translatePress will add only the strings that are still existing again.Feature Request #2
To get rid of strings that actually have been translated but are not used any more, I would suggest a “last read”-column and a “log last read” debugging option for that. So, you could enable this setting for a limited time (because it would slow down the page, so only one week for example) and after that, every translation that was not used within that week would get moved to a “backup”-database. There it would be available via the translation memory function for the cases where you figure out that it is still needed even though it was not used in the logging period. And than there would be a “permanently remove unused translations” function that would empty the backup tables.Hi @cristiandraghia,
thanks, I’ll do that.???
I think I made clear what I wanted.
I don‘t understand why you try to insist in me doing things that I don‘t want to, never will do and that are absolutely nonsensical.I reported this topic myself to the mods to have it removed.
I wanted to edit it to add the information in context, not below. So please remove this topic.
Thanks!Error: You do not have permission to edit that topic.
I want to add additional information, but I cant (see error message), so please delete this topic, I start a new one.
Forum: Plugins
In reply to: [Translate Multilingual sites - TranslatePress] Woocommerce emailsHi @cristiandraghia
thanks for your answer. That would be great as this seems to be a frequently question.
I would love to see the developers being inspired and building this functionality right into translatepress, so get’s offically supported. My code shows one possible way of how this could be done.– dartrax
There is actually a solution for that:
https://gist.github.com/dartrax/85b3ab77b8210e92cc50e1b68de83c73With this additional code, the user language will be stored in the order metadata and the “out of order” emails will be sent in the correct language.
– dartrax
A side note to take into account: while emails that get sent after a user action are translated correctly, out of order emails like reminders (if you use subscriptions) will always be sent in the default language as we don’t store the user language in order to know in what language we should send the email
There is actually a solution for that:
https://gist.github.com/dartrax/85b3ab77b8210e92cc50e1b68de83c73With this additional code, the user language will be stored in the order metadata and the “out of order” emails will be sent in the correct language.
– dartrax
I’ve had this problem, too. I can confirm that Alex’ solution works. The string is actually
Hi %s,
(Domain: woocommerce).I’ve had this problem, too.
Simple solution:
Search your database for “Hello Isabella” and delete every occurrence in the trp-tables.
Then, to prevent this from happening again, exclude the string
Hi %s,
(Domain: woocommerce) from being translated using the Exclude gettext strings option from TP Settings –> Advanced Settings.There is actually a solution for that:
https://gist.github.com/dartrax/85b3ab77b8210e92cc50e1b68de83c73With this additional code, the user language will be stored in the order metadata and the “out of order” emails will be sent in the correct language.
– dartrax
Forum: Plugins
In reply to: [Translate Multilingual sites - TranslatePress] Woocommerce emailsThe processing order will arrive in the user’s language, but the “Your order is complete” email won’t since we don’t store what language were they using when the order was done.
There is actually a solution for that:
https://gist.github.com/dartrax/85b3ab77b8210e92cc50e1b68de83c73With this additional code, the user language will be stored in the order metadata and the “out of order” emails will be sent in the correct language.
– dartrax