WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] Need to change default "Events" category to french "Év (9 posts)

  1. fimage
    Member
    Posted 3 years ago #

    I have setup two separate installations of WordPress, one in english the other in french, so each has its own database as requested by my client. In the french version The Events Calendar creates by default a category named "Events". On the web site I have a sidebar widget which displays the categories in french. Is there a way for me to change the category in the french version so it displays as "Événements" instead of "Events"?

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. monodistortion
    Member
    Posted 3 years ago #

    This requires a change to the file the-events-calendar.class.php so any time the plugin is upgraded to a new version you'll have to make the same edit.

    Near the beginning of the file find the line that says:

    const CATEGORYNAME	 		= 'Events';
    

    and change that to whatever you want.

    This should probably be put into the translation file.

  3. fimage
    Member
    Posted 3 years ago #

    Thanks for the reply.

    I have changed that line in the file the-events-calendar.class.php, but unfortunately it does not seem to be working. When I view the site it just comes up with Page Not Found. I think the problem is that the name of the Category is still "Events" in the database and when I try to change it in Categories using the Admin panel it does not let me change it.

    I hope that you will respond again to clarify exactly where the change needs to be made as I really need to get this fixed.

    Thanks,
    Richard

  4. monodistortion
    Member
    Posted 3 years ago #

    Hmm, WordPress stores categories with a numbered ID, a slug used for pretty permalinks, and a display name which is what we're trying to change.

    If you change the const CATEGORYNAME and you edit the category name on the Categories Administration Panel it should work and the ID and the slug wouldn't change.

    Do you know if your database was created with support for UTF-8 characters?

  5. fimage
    Member
    Posted 3 years ago #

    Thanks for staying with this post.

    From your last response I was able to figure out what needed to be changed and now it is working fine.

    Many thanks,
    Richard

  6. alexalex1
    Member
    Posted 3 years ago #

    hey, fimage, i have the exact same problem. i renamed the category from events to agenda and now i get "not found" messages when the evenlist or calendar view links are clicked. What did you do to fix this problem? Could you please help me? I'd owe you.

  7. fimage
    Member
    Posted 3 years ago #

    Hi Alexalex1

    You need to change the Category in the Admin panel which it sounds like you have already done and then you need to edit this PHP file:

    the-events-calendar.class.php

    You will find this file in plugins/the-events-calendar

    In that file look for this line at the top of the file and change "Events" to "Agenda"
    const CATEGORYNAME = 'Events';

  8. alexalex1
    Member
    Posted 3 years ago #

    Hey fimage, thanks a lot for replying! it turns out that i shouldn't have changed the slug of the category, so i left it to "events-2" and just changed the category name and the constant in the php file and now it works fine. :)

  9. Yukon Cornelius
    Member
    Posted 3 years ago #

    you can change the slug, too, by:

    1 deleting any previous categories you created while figuring this out,

    2 then deactivate the plugin,

    3 make the change to const CATEGORYNAME as explained above, and

    4 reactivate the plugin and it will set up everything for you with the new category and slug.

    Thanks for the help, dudes!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic