Home › Forums › Calendar Products › Events Calendar PRO › Changing Label names
- This topic has 3 replies, 2 voices, and was last updated 10 years, 8 months ago by
Geoff.
-
AuthorPosts
-
August 16, 2015 at 11:46 am #996485
John Paul
ParticipantHi.. 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);August 17, 2015 at 9:02 am #996615Geoff
MemberHi 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!
GeoffAugust 17, 2015 at 10:22 am #996653John Paul
ParticipantHi 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
August 17, 2015 at 2:32 pm #996745Geoff
MemberHeck 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 -
AuthorPosts
- The topic ‘Changing Label names’ is closed to new replies.
