Change Location Name and Slug

Home Forums Calendar Products Events Calendar PRO Change Location Name and Slug

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1081334
    Marcel Stephan
    Participant

    Hi,

    Started this topic already, but I’m still stuck with it.

    Change wording of text or string in other language

    Here’s my question, demand, problem:

    As I’m using your plugin for a Dutch site location is being translated into Locatie (which is the perfect Dutch translation), but my customer wants to change this into ‘Theater’ (which is Dutch for Theatre…)

    So I’ve tried to translate some Location entries in the different language (.po and .mo) files, but if I do so the ‘Events on this location’ (PRO version) widget isn’t working anymore.

    Is there a way (yes I’ve tried the plugin, but can’t figure out what to do with it, as I cannot find any string to use) to do this?

    Your plugin gives the option to set a name for the events (both events and single events), maybe you can create something like that for location? (and locations?)

    Or do I have to translate all different language files (I think they are in three different places)? Or will that affect the Widget mentioned above?

    Hope you can help me out.

    #1081706
    Geoff B.
    Member

    Good evening Marcel and welcome back!

    Thank you for reaching out to us.

    We are sorry to hear about the fact that you are still stuck with your string translation issues.
    I would love to help you with this topic.

    As a first troubleshooting step, could you please provide us with your system information in a private reply ? (following the instructions found in the link)

    So I’ve tried to translate some Location entries in the different language (.po and .mo) files, but if I do so the ‘Events on this location’ (PRO version) widget isn’t working anymore.

    Would you mind expanding a bit more on what happens exactly in the Pro widget ?

    Furthermore, did you also change the translation for the po/mo files for Pro (each add-on has it’s own set of language files AND some of them might require updating from the sources or the POT file) ?

    Is there a way (yes I’ve tried the plugin, but can’t figure out what to do with it, as I cannot find any string to use) to do this?

    I am sorry to hear that, but as you might suspect, instructions on how to use a third-party plugin is unfortunately outside the scope of our support 🙁

    Your plugin gives the option to set a name for the events (both events and single events), maybe you can create something like that for location? (and locations?)

    That’s a great suggestion. In fact, you can suggest it or cast your vote on other features in our User Voice forum.

    Or do I have to translate all different language files (I think they are in three different places)? Or will that affect the Widget mentioned above?

    Yes, ideally if you change the translation in one spot, you should change the same string everywhere to avoid issues.

    Back to your original thread, I do believe my awesome colleague Geoff asked some very good questions towards the end about how you used the snippet.

    The reason I am mentioning this is because using the snippet would by far be the simplest option.
    If you could expand on how you implemented that code in the functions.php file of your WordPress theme (or better yet share the code via Gist or Pastebin), I think we could probably find a way to make it work for you.

     

    Have a great day!

    Geoff B.

     

    #1081869
    Marcel Stephan
    Participant

    This reply is private.

    #1081886
    Marcel Stephan
    Participant

    Hi,

    Here’s my response to your questions.

    I did change one of the language files (I think it was the one in the wp-content/plugins/the-event-calendar/lang folder), just changed the single term/phrase (don’t know how you call it) that said Location. It changed on the event page, I think it’s the single event page where all details are at the bottom.
    But when I hit the page where alle locations are, it was empty. That page is filled with the Pro-Widget that shows all events on a location. (its this one: http://www.theatercolleges.nl/theaters/)

    At that point I realised that I had to translate all, including all sentences where the phrase location is, which is quite a lot. But I didn’t dare to, as I wasn’t sure if this would work out.

    I’m not a develop-genius and thought I might ask first before doing so. But if translating all language files (and they are all over the place in this particular case) will do the trick for me, I will do so. But I have to be sure that will do the trick for me (and have to implement these language files into the child theme too).

    Your suggestion about the snippet, like your collegue did, is a bit too difficult for me. But maybe you can point me in the right direction?

    I have suggested my idea into your user-voice forum. Hopefully this can help me and others.

    Thanks for your support, hope we can sort this out.

    #1082222
    Geoff B.
    Member

    Good afternoon Marcel,

    Thank you for the system information, for making a User Voice suggestion and for the answers to my questions.

    But when I hit the page where all locations are, it was empty. That page is filled with the Pro-Widget that shows all events on a location. (its this one: http://www.theatercolleges.nl/theaters/)

    At that point I realised that I had to translate all, including all sentences where the phrase location is, which is quite a lot. But I didn’t dare to, as I wasn’t sure if this would work out.

    You are right, it can seem like a daunting task. But normally, you could limit the translation changes to the strings you are interested in and it should do the trick.

    At least, as well as you are using the latest versions of the translation files. Read the following to have access to them: https://theeventscalendar.com/moving-to-glotpress/

    There should be 2 language files to update. One for the Events Calendar and one for the Events Calendar Pro.

    Normally, you do not need to implement these in your child theme. You just need to make sure they are either in your plugins language folder OR in wp-content/languages/plugins

    Your suggestion about the snippet, like your collegue did, is a bit too difficult for me. But maybe you can point me in the right direction?

    I understand that you might be reluctant. The good news is that it’s not as bad as it looks.

    The only tools you will need are:

    1. An FTP client (e.g.: Filezilla)
    2. A text editor (e.g:Notepad)

    What you need to do is to:

    • Log to your site via FTP
    • Navigate to public_html/wp-content/themes/your-theme-name
    • Find the functions.php file of your theme and open it via FTP
    • Add the code in and save the file on your server

    If anything goes “wrong”, you can simply undo the change you just did to the functions.php file and re-save it

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1082344
    Marcel Stephan
    Participant

    Hi,

    So it looks easy, and is, all I have to do is ‘Add the code in and save the file on your server’

    My question is: what code?

    About the language files:

    If I go to the folder where the website is, I can find a lot of language files for the Plugin. Can you tell me exactly which ones I have to ‘re-translate’ and where I have to store them?

    Language files can be found in:
    wp-content/languages/the-events-calender-nl_NL.po
    wp-content/languages/plugins/the-events-calender-nl_NL.po
    wp-content/plugins/events-calender-pro/lang/the-events-calender-pro-nl_NL.po
    wp-content/plugins/events-calender/lang/the-events-calender-nl_NL.po

    Do I have to pick the last two, change them and upload them in wp-content/languages/plugins?

    #1082833
    Geoff B.
    Member

    Hey Marcel,

    My question is: what code?

    That’s a great question.
    The code you need to add is at the bottom of the following page: https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/

    Of course you’ll first want to make sure you input “locatie” and “theater” in the right spots first 🙂

    About the language files, you are right, you have quite a few of them. Let me help you clean it up a bit first.

    wp-content/languages/the-events-calender-nl_NL.po
    wp-content/languages/plugins/the-events-calender-nl_NL.po

    These 2 look like duplicates. You can get rid of the one found in wp-content/languages/the-events-calender-nl_NL.po 

    wp-content/plugins/events-calender-pro/lang/the-events-calender-pro-nl_NL.po
    wp-content/plugins/events-calender/lang/the-events-calender-nl_NL.po

    These are the core ones found with the plugin. But, unfortunately, sometimes these are not 100% updated, even when packaged with the plugin.
    What I would recommend is getting an updated version from Glotpress. Read all about it here: https://theeventscalendar.com/moving-to-glotpress/

    So my recommended procedure would be:

    • Pick the latest versions of the last 2 from GlotPress
    • Modify them to your liking
    • Put them in wp-content/languages/plugins/
    • Remove the copies of the dutch translation found in wp-content/plugins/events-calendar/lang/ and in wp-content/plugins/events-calender-pro/lang/

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1083862
    Marcel Stephan
    Participant

    Well,

    Simply adding the code won’t do it for me. (I’m quite of o nitwit when it comes to coding). The only thing that happens, when I copy and paste the given code is that all translation will go back to English. And I seriously doubt that it will do the trick as this Venue(s) is all over the place.

    So the alternative would be translating the language files. But when I went to the Glotpress site I got lost again. So I think the only thing I can do is use the ones you mentioned, change them and put them in the right folder (and get rid of the other ones).

    Hopefully this will work, if not I give up and tell my customer the Plugin provides a lot of functionality, but this is a step too far. Lost in Translation.

    cheers

    #1083870
    Marcel Stephan
    Participant

    Additional question:

    So my recommended procedure would be:

    Pick the latest versions of the last 2 from GlotPress
    Modify them to your liking
    Put them in wp-content/languages/plugins/
    Remove the copies of the dutch translation found in wp-content/plugins/events-calendar/lang/ and in wp-content/plugins/events-calender-pro/lang/

    Do I have to give them the same name as the current files in those folder have? When I export the latest version from GlotPress they are named wp-plugins-the-events-calendar-stable-nl.po and wp-plugins-the-events-calendar-stable-nl.po

    #1084134
    Geoff B.
    Member

    Good evening Marcel,

    Simply adding the code won’t do it for me. (I’m quite of o nitwit when it comes to coding).

    I’m sorry to hear that, but I understand where you are coming from.
    That being said, you are right, adding the code in without first tweaking it will not accomplish what you are looking for.

    Do I have to give them the same name as the current files in those folder have? When I export the latest version from GlotPress they are named wp-plugins-the-events-calendar-stable-nl.po and wp-plugins-the-events-calendar-stable-nl.po

    Congratulations on managing to download the correct files from Glotpress.

    To answer your question, yes you should give them the same name as the one found in the folder (e.g.: the-events-calendar-nl_NL.mo)

    You are almost there!

    Have a great evening,
    Geoff B.

    #1089776
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Change Location Name and Slug’ is closed to new replies.