דלג על ניווט
Sun Mon Tue Wed Thu Fri Sat
12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 - -
- - - - - - -

אזור זמן של תומך: Asia/Karachi (GMT+05:00)

נושא זה מכיל 0 תגובות, יש ל 1קוֹל.

עודכן לאחרונה על ידי Sietse לפני 2 חודשים, 3 שבועות.

בסיוע: Noman.

מחבר פוסטים
אוקטובר 2, 2024בְּ- 2:41 pm #16246237

Sietse

Background of the issue:
I would like to target the strings inside a custom HTML email template. A template is being used in GravityForms to override the HTML style of the outgoing email HTML.

Here is a snippet of that code, including the strings

This is an example of my code:
Fake Address 101
0011 AB Netherlands
T — 030 21 203 54
W — test-domain.com

How do I mark these strings so that I can load them in my WPML editor and translate them? So to be clear, I have a template like this:

add_filter( 'gform_html_message_template_pre_send_email', 'notification_template' );

function notification_template( $template ) {
$template = '

{subject}

{message}

';

return $template;
}

And inside the body, I have a email signature that I would like to have translated. I found this documentation: https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/ but is it as easy as doing this:

Here’s how you can make the code ready for translation with WPML by replacing the actual text with placeholder dummy text while ensuring the strings are translation-ready:

html
Code kopiëren

And how would I translate the URL's and make sure that they are connected.

Also, the text-domain for GravityForms is being generated for each form. So for example form with ID 1, has gravity_form-1. I want the email HTML to occur, disregarding of a specific form and I don't want to use every possible text-domain for future forms as well.

Symptoms:
I am struggling with preparing my custom HTML template to be translatable. I am able to use the {message} field inside GravityForms but I would like to make that as clean as possible and not use any HTML inside that message tab. So I want to add the signature that is currently being added by code, so that the user does not see it.

I am also struggling with targeting the right text-domain, as GravityForms generates a text domain for each individual form.

Questions:
I want to know how to target all the forms, without the need to target each form individually with the _1 addition.

I also want to know how to prepare my HTML code so it is ready for translation. The signature in

הנושא '[סגור] Translation of GravityForms strings ' סגור לתשובות חדשות.