Home › Forums › Calendar Products › Events Calendar PRO › Change all instances of 'Events' to 'Classes' – Solution doesn't work
- This topic has 9 replies, 3 voices, and was last updated 9 years, 7 months ago by Barry.
-
AuthorPosts
-
October 5, 2014 at 7:08 pm #790141yearntolearnParticipant
The solution provided here https://theeventscalendar.com/support/documentation/changing-the-word-events-to-something-else/ does not work as you end up with ‘Classs’ rather than ‘Classes’ and so on.
The solution only works on words where the plural is not formed by adding an ‘es’October 5, 2014 at 9:53 pm #790379codeinkParticipantExperiencing the same issue.
October 6, 2014 at 9:19 am #791653BarryMemberI’m sorry to hear that. Are you using it “as is” or have you modified it at all (if you modified it, can you share your modified code via Pastebin, Gist or some similar service)?
Certainly when testing locally it seems to work as expected. Are there any specific areas you’re finding it does not cover?
October 6, 2014 at 9:21 am #791662codeinkParticipantSite title (in browser), navigation links in particular are two areas I remember off the top of my head. They show as “Classs” instead of “Classes”. Using the code “as is” with the swapping of words only (Class / Classes)
October 6, 2014 at 10:25 am #791800BarryMemberHi!
@codeink: can you share a URL pointing me to an example where this fails to work as expected in the browser title (or tell me more specifically which views this fails on)? If you prefer to open a new thread – which will allow you to share your URL in confidence – definitely feel free to do so.Re navigation links, if you mean custom links within a regular WordPress nav menu then you would need to update this manually – those are not translated (nor in fact are any custom links).
They show as “Classs” instead of “Classes”.
So it sounds like you may need to refine your str_replace() code a little – best I can tell there is no similar situation with the original snippet.
Please feel free to share your modifications via Pastebin/Gist and I’ll take a quick look – but please do remember we provide things like this snippet as a starting point and if you need to tailor it to your own situation that’s normally something you need to drive forward.
@yearntolearn: how are you getting on here?October 6, 2014 at 3:45 pm #792412yearntolearnParticipantHi Barry,
The code was not modified at all apart from replacing the instances of Meeting, Meetings, meeting & meetings that appeared in th code snipped with Class, Classes, class and classes. As i mentioned, the solution ONLY works on words where the plural is not formed by adding an ‘es’
October 6, 2014 at 3:46 pm #792414yearntolearnParticipantThis reply is private.
October 6, 2014 at 4:28 pm #792516BarryMemberOK – so can you try changing the order of each array such that plurals are converted first of all?
Otherwise, “Events” will be converted to “Classs” – leaving a dangling “s” as you’ve noticed.
October 6, 2014 at 5:57 pm #792722yearntolearnParticipantThe don’t call you Clever Pete for nothing!
October 7, 2014 at 12:49 am #793428BarryMemberHah! Happy to help 🙂
I’ll go ahead and close this thread – but if anything else crops up please do just create new threads as needed.
Thanks again!
-
AuthorPosts
- The topic ‘Change all instances of 'Events' to 'Classes' – Solution doesn't work’ is closed to new replies.