WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Translation for "bookings_page" (to german) (8 posts)

  1. pa.Nick
    Member
    Posted 1 year ago #

    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/

  2. agelonwl
    Member
    Posted 1 year ago #

    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/

  3. pa.Nick
    Member
    Posted 1 year ago #

    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.

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    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.

  5. pa.Nick
    Member
    Posted 1 year ago #

    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").

  6. agelonwl
    Member
    Posted 1 year ago #

    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);
  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    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 );
  8. pa.Nick
    Member
    Posted 1 year ago #

    Hi agelonwl, hi Marcus!

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic