Home › Forums › Calendar Products › Events Calendar PRO › Formatting the Dates – One for English and One For French
- This topic has 4 replies, 3 voices, and was last updated 10 years, 1 month ago by
Support Droid.
-
AuthorPosts
-
March 15, 2016 at 4:05 pm #1089400
Lang
ParticipantHello guys,
I have a site where I have to have events in both english and french.
Here is an event in french:
This is using an event category : Fr-Ontario
As you can see the dates are still in english.
Here is the same event in english:
http://collegecentreofboardexcellence.ca/event/introduction-to-risk-management-part-two-2/
This is using an event category : non-ontario
Is there a way to show french formatted dates for certain event categories ?
Basically, I want french dates to show for french events and english dates to show for english events.
Also:
I have an events page in english that shows my events, the dates are formatted for english which is fine.
http://collegecentreofboardexcellence.ca/our-events/
Here is the events page for the french events, but it is showing in english, the format needs to be in french.
http://collegecentreofboardexcellence.ca/fr-events/
How can I do this ?
Right now, each event that I create, I have to create two events, one for french, and one for english.
March 16, 2016 at 12:12 pm #1089899Geoff B.
MemberGood evening Lang and welcome to the Events Calendar Support forum!
Thank you for reaching out to us.
I would love to try to help you with this topic.Just to set expectations, as you might know, the scope of our support is mostly to get our wonderful customers started on the right track to customize their site and to help them in case of issues. We unfortunately do not provide complete support for customization.
With that in mind, here are my recommendations to achieve what you are looking for.
For many reasons (including SEO), the best way to handle multilingual websites would be to use a WordPress multilingual plugin such as WPML (which we do support for the free and Pro version of the Events Calendar plugins). You can read more about it here: https://theeventscalendar.com/knowledgebase/setting-up-the-events-calendar-with-wpml/ . Otherwise, the locale of your pages is always lang=”en-US”.
If that is not possible, you will have to do some template customization. You might want to read our Themer’s guide to get a general sense of how that works.
The goal here will be to write a function that will present a different date format when certain event categories OR a specific URL are detected.
As a starting point, I would consider using the following function https://theeventscalendar.com/function/tribe_event_in_category/Let me know if that helps.
Have a great day!
Geoff B.
March 17, 2016 at 8:49 am #1090297Lang
ParticipantHey,
I took your suggestion and I installed WPML, but it’s still not working.
I created a french event using the instructions you provided but my dates are still showing in english.
http://collegecentreofboardexcellence.ca/event/introduction-to-risk-management-part-three-2/?lang=fr
Why is this happening ?
I can give you admin access if you need it .
March 17, 2016 at 11:01 pm #1090790Geoff B.
MemberGood evening Lang,
Kudos on choosing WPML. A little tweaking and you should be good to go.
Take a read at the following post and let me know how that goes: https://wpml.org/forums/topic/date-formatting-issue/
Best regards,
Geoff B.
April 1, 2016 at 9:35 am #1097107Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Formatting the Dates – One for English and One For French’ is closed to new replies.
