Support

Home Forums Event Espresso Premium EE4 Date format, week day names, month names

EE4 Date format, week day names, month names

Posted: August 21, 2014 at 7:19 am

Viewing 9 reply threads


Henrik Sommar

August 21, 2014 at 7:19 am

EE4 is not picking up the WordPress language (Swedish) and settings when it comes to time, week day and month names and formatting.

I have altered the Event Espresso settings with no success.


Lorenzo Orlando Caum

  • Support Staff

August 21, 2014 at 12:24 pm

Hello,

These translations need to be added to the translation file:

http://translate.eventespresso.com/projects/event-espresso-4/sv/event-espresso-sv_SE

This tool can be used:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#

Another option is to request translator access and then you can make translations through the glotpress online area:

https://eventespresso.com/features/languages/#form


Lorenzo


Henrik Sommar

August 22, 2014 at 3:20 am

Thanks! I used the plugin CodeStyling Localization to edit the po-file.

Remaining problems:
• Event Espresso – Calendar > Advanced Settings > Column Format > Week:
I cannot edit this field. It pops back to “ddd M/d” when saved.

• Widget date and time formatting. Where can I edit this?
Sat Aug 24th, 2014 (Is “D M jS, Y”. Want “l j M”)
5:00 pm – 6:30 pm (Is “h:i a – h:i a”. Want “H:i – H:i”)


Josh

  • Support Staff

August 22, 2014 at 2:22 pm

Hi Henrik,

I checked on the calendar settings and those should let you change them. Which versions of EE4 and the calendar are active? When you check the calendar on the front-end, does the week view header display your set format?

You can edit the widget date and time formatting on line 290 of EEW_Upcoming_Events.widget.php. Since the edit will get overwritten on an update, we recommend creating a new widget based off the default widget. You can create a new widget by following these steps:

1) copy the contents of EEW_Upcoming_Events.widget.php into your custom plugin or child theme’s functions.php file.

2) change the class name of you copy like this:

class the_custom_EEW_Upcoming_Events  extends WP_Widget {
/**
     * Register widget with WordPress.
     */
    function __construct() {
        parent::__construct(
            'custom-ee-upcoming-events-widget',
            __( 'Custom Event Espresso Upcoming Events', 'event_espresso' ),

3) then register and load the widget

// Register and load the widget
function my_load_customEE_widget() {
register_widget( 'the_custom_EEW_Upcoming_Events' );
}
add_action( 'widgets_init', 'my_load_customEE_widget' );

4) optionally unregister_widget the stock EE upcoming Events widget


Henrik Sommar

August 26, 2014 at 2:17 am

Thanks for the help.

I did step 1 – 3. And the new Custom widget appeared.

But when I save the widget it reverts to default values (Empty title, “- display all -” etc). When refill the saved widget the values remains but the widget trasform to the stock EE widget.

(Is it the step 4 that solves this? I tried to follow in the fuctions.php file with no success)


Henrik Sommar

August 26, 2014 at 2:18 am

Missing link in the message above:

(Is it the step 4 that solves this? I tried to follow this pattern http://codex.wordpress.org/Function_Reference/unregister_widget in the fuctions.php file with no success)


Josh

  • Support Staff

August 27, 2014 at 12:32 pm

Step 4 is optional. Here’s a gist of the basic idea packaged up in a plugin:

https://gist.github.com/joshfeck/27a285c4285a6c986053


Henrik Sommar

August 28, 2014 at 1:39 am

Thank you! The code on widget date and time formatting on line 290 worked.

Remaining problems:
• Event Espresso – Calendar > Advanced Settings > Column Format > Week:
I cannot edit this field. It pops back to “ddd M/d” when saved.


Josh

  • Support Staff

August 29, 2014 at 1:40 pm

Hi Henrik,

We’ll fix this in a future update of the calendar add-on, but in the meantime you can patch it if you’d like. If you open up the calendar_advanced_settings.template.php file you’ll find the line of code ~98 where it builds the Column format week input. You can change it to the following to fix:

<input type="text" class="medium-text" name="calendar[column_format][week]" id="columnFormat_week" value="<?php echo htmlentities($calendar_config->column_format->week) ?>"><br />


Lorenzo Orlando Caum

  • Support Staff

September 12, 2015 at 2:45 pm

Hello again Henrik,

We have a new resource that explains how to translate Event Espresso. You can view it here:

https://eventespresso.com/wiki/how-to-translate-event-espresso/

Also, GlotPress now has translation strings that are up to date for the current Event Espresso 4.8.x platform.


Lorenzo

Viewing 9 reply threads

The support post ‘EE4 Date format, week day names, month names’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso