WordPress.org

Support

Support » Plugins and Hacks » Events Manager » [Resolved] Translation for "bookings_page" (to german)

[Resolved] Translation for "bookings_page" (to german)

  • Hello!

    I tried to translate/change some words in the “bookings_page” (after following the link “manage my bookings”), that i can´t find in the dbem-de_DE.po or in the settings/format.
    Strangely, the words are translated, but they (or the original terms) aren´t also to find in dbem-de_DE.po. (I searched for the original and the germans words.)

    Has anybody an idea, where i can find the original terms for (following the link “manage my bookings” –>) “bookings_page”,
    that site shows the events which i´ve booked

    1. Headline: (probably) “my bookings” (already translated to “meine Reservierungen”
    – i´ll change it to “Meine Anmeldungen”

    2. Status: (probably) “approved” (already translated to “genehmigt”)
    – i´ll change it to “bestätigt”

    Greets
    Oliver

    PS: Please apologize my bad english 😉

    http://wordpress.org/extend/plugins/events-manager/

Viewing 7 replies - 1 through 7 (of 7 total)
  • it has a template file at wp-content/plugins/events-manager/templates/templates/my-bookings.php

    Using templates: http://wp-events-plugin.com/documentation/using-template-files/

    Translating EM: http://wp-events-plugin.com/documentation/translating/

    Thanks for your answer.

    Unfortunately i can´t find the original terms in this way.

    I think that i would find the transleted words in the de_DE.mo, too, if I take into account the upper and lower case:
    meine” or “meine Reservierungen”.

    But i can only find similar entries, for other parts/templates.

    Plugin Author Marcus

    @netweblogic

    Could it be that you’re referring to page names? If so, you can edit them in your admin area, some stuff is installed first time round and saved to the database, including texts etc. in your Events > Settings > Formatting section. You’d need to change htose to reflect on your site.

    Hi Marcus!

    Now i see the options for create a own site.
    This is a solution to edit the translation for the headline (“My bookings”). Great!

    So i only need a solution to translate the options for Status, e.g. “approved” (it´s already translated to “genehmigt”, but i want change it to “bestätigt”).

    you can try to hook into em_booking_get_status filter.

    e.g.

    function my_em_mod($status,$EM_Booking){
     /*custom codes below*/
    
     /**/
     return $tatus;
    }
    add_filter('em_booking_get_status','my_em_mod',1,3);

    Plugin Author Marcus

    @netweblogic

    Here’s two examples of how you can do this by hooking into gettext, which is when it’s translated (edit translation texts accordingly):

    //Rewrite any gettext field
    function my_em_text_rewrites($translation, $orig, $domain) {
    	switch ($orig) {
    		case 'Booking is now fully paid and confirmed.' :
    			$translation = 'your text here';
    			break;
    		case 'Repeat this again for what you want to translate (needs to be exactly same text in english)' :
    			$translation = 'your text here';
    			break;
    	}
    	return $translation;
    }
    add_action ( 'gettext', 'my_em_text_rewrites', 1, 3 );

    or

    //Rewrite any gettext field
    function my_em_text_rewrites($translation, $orig) {
    	$translation = str_replace('Booking','Ticket',$translation);
    	$translation = str_replace('booking','ticket',$translation);
    	return $translation;
    }
    add_action ( 'gettext', 'my_em_text_rewrites', 1, 2 );

    Hi agelonwl, hi Marcus!

    Thank you for the answers. I´ll try it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Translation for "bookings_page" (to german)’ is closed to new replies.
Skip to toolbar