Home › Forums › Calendar Products › Events Calendar PRO › Changing text of COSTS
- This topic has 15 replies, 3 voices, and was last updated 9 years, 6 months ago by
anjuly.
-
AuthorPosts
-
September 29, 2016 at 1:46 am #1170254
anjuly
ParticipantHey there,
I’m from Germany and I want to change the word ,Eintritt’ to ,Spendenvorschlag’ – see first Attachment.
Do you have a code snippet for this problem? I’d tried something out with events ticket, but that doesn’t work.
And there is another Problem, is it possible to have also ,Spendenvorschlag’ in front of the prices? – see 2nd Attachment.
Best Regards and thanks a lot!
JulySeptember 29, 2016 at 9:17 am #1170423Geoff B.
MemberGood afternoon Annette and welcome back!
Thank you for reaching out to us.
We are sorry to hear about
I would love to help you with this topic.Your best bet would be to update the .po and .mo files in German and place them in the /wp-content/languages/plugins/ folder.
That way, you could change the text to your liking.As an alternative you can also add the following snippet (after some tweaking) to your theme’s functions.php: https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/
Let me know if that helps.
Have a great day!
Geoff B.
September 29, 2016 at 10:35 am #1170584anjuly
ParticipantHi Geoff,
it is not a problem of translation from english to german, it is more a question of taken another word for german EINTRITT to german SPENDENVORSCHLAG.
The Plugin is well translated (exept the little window view all events ;-))And another problem with the costsview:
is it possible to add a word in front of the Costs?? (see attachment)A little bit complicated but we are building a nonprofit association and so it is important…for the tax man ;-))
Maybe you’ll have a solution.
Thanks a lot!!!
JulySeptember 30, 2016 at 9:02 am #1171033Geoff B.
MemberHey July,
Thank you for clarifying that. I must confess that my German skills are pretty basic.
So I appreciate you taking the time to explain.The good news is that this does not change the solutions 🙂
To replace EINTRITT by SPENDENVORSCHLAG:
- You can edit the .po/.mo files using the free Poedit software: https://poedit.net/
- /wp-content/plugins/the-events-calendar/lang/the-events-calendar-de_DE.po and the-events-calendar-de_DE.mo
- /wp-content/plugins/events-calendar-pro/lang/tribe-events-calendar-pro-de_DE.po and tribe-events-calendar-pro-de_DE.mo
- Add the following snippet (after some tweaking) to your theme’s functions.php: https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/
I can assist you with any of these should you need it.
And another problem with the costsview:
is it possible to add a word in front of the Costs?? (see attachment)Yes, this can be done. What you need to do is to identify all the views where you want this to be displayed (single event, week, etc..)
Once that’s done, you will need to do a template customization. You might want to read our Themer’s guide to get a sense of how that works.
Basically, what that means is:
- Create a new folder (/tribe-events/) in your WordPress theme or child theme
- Copy the files from the views you want to modify in this folder and tweak these files to add that extra word in front of the costs
Let me know if that helps.
Have a great day!
Geoff B.
October 2, 2016 at 12:35 am #1171593anjuly
ParticipantHi Geoff,
thanks for your effort!Poedit (1.5.7 – because of Mac 10.6.8) only works with the event Calendar but not with event calendar pro – that means I changed the text from ,Eintritt’ to ,Spendenvorschlag’ but in the Pro-Version after saving I get the old Text…
And I tried the snippet with Code Snippet and this also doesn’t work.
October 3, 2016 at 9:13 pm #1172062Geoff B.
MemberGood evening July,
To get “SPENDENVORSCHLAG” to display in the meta information of the single event, you normally only need to change the file for our free plugin. I just tested it and it works.
Here are all of the updated German files (so that you can use them). German_updated
If that still does not work, there is a chance that your WordPress is hardcoding these strings.
Could you please send me a copy of your WordPress theme in a .zip file link with a private reply (via Dropbox or Google Drive) so that I can run some tests on my end ?
Please ensure you are using the latest files as found on your actual website.
This way I will get access to any updates you might have made.Let me know how that goes.
Best regards,
Geoff B.October 4, 2016 at 12:00 am #1172114anjuly
ParticipantThis reply is private.
October 4, 2016 at 12:04 am #1172115anjuly
ParticipantThis reply is private.
October 4, 2016 at 5:02 am #1172197anjuly
ParticipantThis reply is private.
October 4, 2016 at 11:35 pm #1172574Geoff B.
MemberGood evening July,
Thank you for writing back.
Here is an updated version of your child theme that includes the snippet.
I have tested it and it works. themetrust-create ChildYou only need to replace your current child theme with this one.
To be on the extra safe side, you can always drop the language files I have sent you in your /wp-content/languages/plugins/ folder as well.
This should take care of changing the text of the string once and for all.
As for your second need, that is a bit different. That specific field has validations on it.
This is why you are currently not free to input just any text.Let me ask around tomorrow to see if we cannot override that validation.
Hang in there and let me know how the first part goes,
Geoff B.
October 5, 2016 at 11:57 am #1172889Geoff B.
MemberGood evening July,
I have asked around regarding the bypass of the format validation for Cost.
Although it is not impossible, bypassing that validation will create several issues and threaten the proper functioning of our plugin.
The best approach to do what you are looking for would be to:
- Use the Events Calendar Pro’s additional field functionality: https://theeventscalendar.com/knowledgebase/pro-additional-fields/
- Hide the current cost field value from the single event details section
- Replace that by the additional field
This is the cleanest most stable approach.
That being said, it does require some tweaking (which I suspect you might not be a fan of).
With that in mind, I would like to help you set it up if you are game.But first, can you tell me how my previous updated child theme effort went ?
Best regards,
Geoff B.
October 10, 2016 at 12:26 am #1174386anjuly
ParticipantGood morning Geoff,
thanks a lot!!!First: your updated child theme doesn’t go…? But that doesn’t Matter.
The additional field goes!But I need it in this specific field on top. So I’ll can change between Costs and Donation.
(Your answer: “As for your second need, that is a bit different. That specific field has validations on it.
This is why you are currently not free to input just any text.“)
I’m a little bit astonished about this, because when I insert in the Cost-Field only Text like: Spenden erwünscht, it goes…
But I need text with the special prices.So first I had the problem with the sign between the costs. There was no possibility to take a slash between the Costs like this 20/10€ and I’ve got this snippet
add_filter( ‘tribe_events_cost_separators’, ‘custom_cost_separators’ );
function custom_cost_separators() {
return array( ‘,’, ‘.’, ‘/’ );
}and this works – so maybe you can give me a nother snippet for this??
So, I hope that you’ll understand the most of my broken English and I don’t run you crazy .., it is a little bit hard for me to explain.
Many Thanks!!
JulyOctober 10, 2016 at 11:26 pm #1174792Geoff B.
MemberGood evening July,
Thank you for sticking with us in spite of the English language challenge.
I am glad that the additional field works.
But I need it in this specific field on top. So I’ll can change between Costs and Donation.
I can help you with where it is displayed. For that I will need a couple of things from you:
- Could you send me a screenshot with an arrow for exact desired position of the additional field ?
- Is it possible to get a copy of your WordPress theme / child theme in a .zip file link (via Dropbox or Google Drive) so that I can run some tests on my end ? (you can use a private reply for that)Please ensure you are using the latest files as found on your actual website.
This way I will get access to any updates you might have made.
I’m a little bit astonished about this, because when I insert in the Cost-Field only Text like: Spenden erwünscht, it goes…
But I need text with the special prices.Before we continue, I would like to set expectations.
As you might know, the scope of our support is mostly to get our customers started on the right track and to help them in case of issues. We unfortunately do not provide complete support for customization.
With that in mind, the cost field is used in several other places in the code.
As stated before, since you have a very different use in mind for the cost field, I highly recommend using a brand new field that has no extra logic tied to it instead of trying to hack an existing field.I am looking forward to the 2 things above.
Have a great day!
Geoff B.
October 12, 2016 at 12:18 am #1175278anjuly
ParticipantGood morning Geoff,thanks for your patience!
I will make it with the additional field or integrade the Costs in the normal textfields.So, thanks a lot again for all these friendly support!!!!
Have a nice Day,
cheers
JulyOctober 12, 2016 at 10:49 am #1175520Geoff B.
MemberGood afternoon July,
Thank you for the great words and I am stoked that you are well on your way to accomplishing what you are looking for.
You are welcome back on our support forums any time 🙂
For now, I am going to close this thread.
Have a great week!
Geoff B.
- You can edit the .po/.mo files using the free Poedit software: https://poedit.net/
-
AuthorPosts
- The topic ‘Changing text of COSTS’ is closed to new replies.
