Support

Home Forums Event Espresso Premium Problems with german translation

Problems with german translation

Posted: April 25, 2014 at 10:38 am

Viewing 7 reply threads


Frank Goll

April 25, 2014 at 10:38 am

I have a further question regarding EE4. To work with this plugin for my clients in Germany I have to translate some in German. I use WP Localization for the translation. However, I find no way in the top of the page „Payment Options“ and „Attendee Information“ to translate it in German „Zahlungsmöglichkeiten“ and “Teilnehmerinformation”.

I’ve tried „Proceed%1$sto%1$s“ to translate it in „Weiter%1$szu%1$s“ for the button below. This works, but here I have again the problem, although I translate „%sPayment Options“ in „%sZahlungsmöglichkeiten“ get still displayed on the button in english “Payment Options”.

I hope my English is understandable enough and you can help me.

You can find my test page under http://frank-goll.de/?page_id=5&ee=_register

Thank you very much for your help.


Lorenzo Orlando Caum

  • Support Staff

April 25, 2014 at 11:41 am

Hi Frank,

Here is an example for how to change the button text:

https://eventespresso.com/topic/proceed-to-paiement/#post-93795

Here is an example for how to change the Attendee Information text to something else:

https://eventespresso.com/topic/registration-form-formatting-error/#post-93165


Lorenzo


Frank Goll

April 25, 2014 at 1:06 pm

Hi Lorenzo,

Attendee Information: I have done that, but it still not work. On the Top (next to 1) – steps – it still says „Attendee Information“ (http://frank-goll.de/?page_id=5&ee=_register).

Change the button text: I´m still a beginner and sorry for my question. But where do I insert the code?

I know I have many questions. But I’m already on despair with EE4. Please excuse me for that. I will then also never ask a question again 🙂


Lorenzo Orlando Caum

  • Support Staff

April 25, 2014 at 5:16 pm

On this example here:

https://eventespresso.com/topic/registration-form-formatting-error/#post-93165

…you would need to change the post id of 5 to the post id of your actual registration checkout page.


Lorenzo


Frank Goll

April 27, 2014 at 2:21 pm

Hi, thank you very much for helping me with the link to change „Attendee Information“ beside step 1 in that word, what I want.

If I would like to change the text „payment options“ in the top (step 2) then I use the same code in the functions.php? Does it work?

My second question again amending the button. The code below your link https://eventespresso.com/topic/proceed-to-paiement/#post-93795
where do I paste it? Also in the functions.php? Or where do I enter these two code snippets?


Dean

April 28, 2014 at 4:27 am

Hi,

By changing Payment Options, you will change all instances of it. So on the Step 2, both the title and button will be changed.

Those code snippets can go into your theme’s functions.php or into a custom plugin.


Frank Goll

April 28, 2014 at 1:34 pm

Hi Dean,

I pasted following code into functions.php of my test-page:

<code>add_filter (&#039;FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__proceed_to&#039;, &#039;my_custom_checkout_button&#039;);
	 
	function my_custom_checkout_button() {
	    return &#039;Zahlungsmöglichkeiten&#039;;
	}
	function mycustom_filter_gettext( $translated, $original, $domain ) {
	 
	    // This is an array of original strings
	    // and what they should be replaced with
	    $strings = array(
	        &#039;Payment%sOptions&#039; =&gt; &#039; Zahlungsmöglichkeiten&#039;
	        // Add some more strings here
	    );
	 
	    // See if the current string is in the $strings array
	    // If so, replace its translation
	    if ( isset( $strings[$original] ) ) {
	        // This accomplishes the same thing as __()
	        // but without running it through the filter again
	        $translations = &amp;get_translations_for_domain( $domain );
	        $translated = $translations-&gt;translate( $strings[$original] );
	    }
	 
	    return $translated;
	}
	 
	add_filter( ‚gettext&#039;, &#039;mycustom_filter_gettext&#039;, 10, 3 );</code>

`
What I got is a parse error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/doc/21515/frank-goll.de/www/wp-content/themes/fifteen/functions.php on line 184

Could you tell me, what is wrong?


Frank Goll

April 28, 2014 at 1:56 pm

Ok, I have it. Thank you very much.

Viewing 7 reply threads

The support post ‘Problems with german translation’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso