Changing Label names

Home Forums Calendar Products Events Calendar PRO Changing Label names

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #996485
    John Paul
    Participant

    Custom Wording in the Calendar

    Hi.. thanks for the help earlier, very politely pointing out my silly mistake 😉

    So here;s the thing..I go the code to work and have chnaged a few titles to the good….BUT the example in the code

    ‘Related’ => ‘Similar’, does not change the word Related….all my other changes have worked except this one…spooky

    This is what I have …
    function tribe_custom_theme_text ( $translations, $text, $domain ) {
    $custom_text = array(
    ‘Photo’ => ‘Grid’,
    ‘Month’ => ‘Calendar’,
    ‘Events’ => ‘Courses’,
    ‘Related’ => ‘Similar’,
    );
    if(strpos($domain, ‘tribe-‘) === 0 && array_key_exists($text, $custom_text) ) {
    $text = $custom_text[$text];
    }
    return $text;
    }
    add_filter(‘gettext’, ‘tribe_custom_theme_text’, 20, 3);

    #996615
    Geoff
    Member

    Hi John and welcome back!

    I see exactly what you mean and, in fact, “Related” isn’t translating for me either using the same snippet example from the tutorial.

    Turns out the example is incorrect. Here is what you can use to translate Related to Similar instead inside that same snippet:

    'Related %s' => 'Similar %s',

    Sorry for the confusion here and thanks for the heads up–I’m going to update that tutorial right away.

    Cheers!
    Geoff

    #996653
    John Paul
    Participant

    Hi Geoff

    glad to help.. I must admit , when I pasted the code and saw no change to the word “related”(I don’t use the Venue so couldn’t view that)..I thought !!@@***:-( …but then I thought, hey give another title a go, just to check..and bingo………back in business

    thanks for the help though…………..much appreciated!!

    I have learnt huge amounts by doing this website and using your plugin..it has forced me to get more into understanding PHP and has helped my CSS skills hugely

    #996745
    Geoff
    Member

    Heck yeah, I’m glad to be of service and am so glad to hear your PHP chops are getting a good workout! Hopefully you’re finding the plugin to be as flexible and extensible as you need it to be but if you ever have any ideas we should consider, please do hit us in our feature request forum and we’d love to check it out. 🙂

    Cheers!
    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Changing Label names’ is closed to new replies.