Changing text of COSTS

Home Forums Calendar Products Events Calendar PRO Changing text of COSTS

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1170254
    anjuly
    Participant

    Hey 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!
    July

    #1170423
    Geoff B.
    Member

    Good 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.

     

    #1170584
    anjuly
    Participant

    Hi 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!!!
    July

    #1171033
    Geoff B.
    Member

    Hey 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:

    1. You can edit the .po/.mo files using the free Poedit software: https://poedit.net/
      1. /wp-content/plugins/the-events-calendar/lang/the-events-calendar-de_DE.po and the-events-calendar-de_DE.mo
      2. /wp-content/plugins/events-calendar-pro/lang/tribe-events-calendar-pro-de_DE.po and tribe-events-calendar-pro-de_DE.mo
    2. 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:

    1. Create a new folder (/tribe-events/) in your WordPress theme or child theme
    2. 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.

    #1171593
    anjuly
    Participant

    Hi 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.

    #1172062
    Geoff B.
    Member

    Good 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.

    #1172114
    anjuly
    Participant

    This reply is private.

    #1172115
    anjuly
    Participant

    This reply is private.

    #1172197
    anjuly
    Participant

    This reply is private.

    #1172574
    Geoff B.
    Member

    Good 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 Child

    You 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.

    #1172889
    Geoff B.
    Member

    Good 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:

    1. Use the Events Calendar Pro’s additional field functionality: https://theeventscalendar.com/knowledgebase/pro-additional-fields/
    2. Hide the current cost field value from the single event details section
    3. 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.

    #1174386
    anjuly
    Participant

    Good 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!!
    July

    #1174792
    Geoff B.
    Member

    Good 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:

    1. Could you send me a screenshot with an arrow for exact desired position of the additional field ?
    2. 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.

    #1175278
    anjuly
    Participant

    Good 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
    July

    #1175520
    Geoff B.
    Member

    Good 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.

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Changing text of COSTS’ is closed to new replies.