Comments ntar started the conversationSeptember 3, 2021 at 7:09amDear 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,613PenciDesign repliedSeptember 3, 2021 at 9:04amHi, 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 repliedSeptember 3, 2021 at 11:19amThank 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] : ''; } Sign in to reply ...
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?
Hi,
Please install the Code Snippet plugin, then create a new snippet with the following content:
Replace Sun, Mon, Tue, ... with your custom text.
Regards,
PenciDesign.
Thank you, everything works. In order not to install unnecessary plugins, I used the functions.php file in Child Theme.
Code: