Aleš Sýkora wrote

Translate fluent forms datepicker

27. 10. 2020 in

Need to translate fluent forms datepicker to your language? No problem.

add_filter('fluentform/date_i18n', function ($strings) {​​​​
     $strings = array(
            'months'           => [
                'shorthand' => [
                    __('Led', 'fluentform'),
                    __('Úno', 'fluentform'),
                    __('Bře', 'fluentform'),
                    __('Dub', 'fluentform'),
                    __('Kvě', 'fluentform'),
                    __('Čen', 'fluentform'),
                    __('Čer', 'fluentform'),
                    __('Srp', 'fluentform'),
                    __('Zář', 'fluentform'),
                    __('Říj', 'fluentform'),
                    __('Lis', 'fluentform'),
                    __('Pro', 'fluentform')
                ],
                'longhand'  => [
                    __('Leden', 'fluentform'),
                    __('Únor', 'fluentform'),
                    __('Březen', 'fluentform'),
                    __('Duben', 'fluentform'),
                    __('Květen', 'fluentform'),
                    __('Červen', 'fluentform'),
                    __('Červenec', 'fluentform'),
                    __('Srpen', 'fluentform'),
                    __('Září', 'fluentform'),
                    __('Říjen', 'fluentform'),
                    __('Listopad', 'fluentform'),
                    __('Prosinec', 'fluentform')
                ]
            ],
            'weekdays'         => [
                'longhand'  => array(
                    __('Neděle', 'fluentform'),
                    __('Pondělí', 'fluentform'),
                    __('Úterý', 'fluentform'),
                    __('Středa', 'fluentform'),
                    __('Čtvrtek', 'fluentform'),
                    __('Pátek', 'fluentform'),
                    __('Sobota', 'fluentform')
                ),
                'shorthand' => array(
                    __('Ne', 'fluentform'),
                    __('Po', 'fluentform'),
                    __('Út', 'fluentform'),
                    __('St', 'fluentform'),
                    __('Čt', 'fluentform'),
                    __('Pá', 'fluentform'),
                    __('So', 'fluentform')
                )
            ],
 
            'amPM'             => [
                __('AM', 'fluentform'),
                __('PM', 'fluentform')
            ],
 
        );
    return $strings;
}​​​​);

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More from category
Aleš Sýkora wrote
Child posts menu for custom post type parent item
1. 2. 2021 in
This code will help you display menu of childs on current post. For example: Product 1 = parent has those child pages: – Product usage– How to– Disclaimer– Calculator When you put this child items menu in your template, it will show all childs of product 1 on all child pages and also on product […]
Read More
Aleš Sýkora wrote
Restrict post types in taxonomy archive
29. 10. 2019 in
If you need to restrict which custom post types will display in taxonomy archive, you need to do it with some PHP. Here is how to do it.
Read More
Aleš Sýkora wrote
Better product gallery lightbox with Oxygen and Fancybox
18. 1. 2021 in ,
I will show you, how I am creating galleries like this (open random car to see it) in Oxygen Builder. I hate the product builder and default behavior of WooCommerce lightbox and magnifying glass function on hover. So I am using Image block wrapped in link – for featured image. And Oxygen’s gallery block for […]
Read More
magnifiercross linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram