Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #2863837
Penci Weather via Elementor - translate Forecast Days
Closed

Comments

  • ntar started the conversation

    Dear Penci Design,

    Is it possible to translate Forecast days (Fri, Sat, Sun, Mon, Tue) directly in the panel, if not, how to do it?

  •  2,613
    PenciDesign replied

    Hi,

    Please install the Code Snippet plugin, then create a new snippet with the following content:

    if ( ! function_exists( 'penci_get_tran_setting' ) ) {
        function penci_get_tran_setting( $day ) {
            $text = array(
                'penci_weather_sun_text' => 'Sun',
                'penci_weather_mon_text' => 'Mon',
                'penci_weather_tue_text' => 'Tue',
                'penci_weather_wed_text' => 'Wed',
                'penci_weather_thu_text' => 'Thu',
                'penci_weather_fri_text' => 'Fri',
                'penci_weather_sat_text' => 'Sat',
            );
            return isset( $text[$day] ) ? $text[$day] : '';
        }
    }

    Replace Sun, Mon, Tue, ... with your custom text.

    Regards,
    PenciDesign.

  • ntar replied

    Thank you, everything works. In order not to install unnecessary plugins, I used the functions.php file in Child Theme.

    Code:

    function penci_get_tran_setting( $day ) {
            $text = array(
                'penci_weather_sun_text' => 'Sun',
                'penci_weather_mon_text' => 'Mon',
                'penci_weather_tue_text' => 'Tue',
                'penci_weather_wed_text' => 'Wed',
                'penci_weather_thu_text' => 'Thu',
                'penci_weather_fri_text' => 'Fri',
                'penci_weather_sat_text' => 'Sat',
            );
            return isset( $text[$day] ) ? $text[$day] : '';
    }