Can't translate Carpress WP theme widget
-
Hello
I am trying to translate “Opening Hours” widget from Carpress WP theme.
Theme was prepackaged with some languages (.po and .mo files) and there was translation of day names in “Opening Hours” widget.There is code where traslatable strins are placed:
/** * Days of the week, needed for display and $instance variable */ private $days; /** * Register widget with WordPress. */ public function __construct() { parent::__construct( false, // ID, auto generate when false _x( "Carpress: Opening Time" , 'backend', 'carpress_wp'), // Name array( 'description' => _x( 'Opening Time Widget for placing it into the sidebar or above the slider', 'backend', 'carpress_wp'), 'classname' => 'opening-time' ) ); // set the right order of the days $start_of_week = get_option( 'start_of_week ' ); // integer [0,6], 0 = Sunday, 1 = Monday ... $this->days = array( 'Sun' => __('Sunday', 'carpress_wp'), 'Mon' => __('Monday', 'carpress_wp'), 'Tue' => __('Tuesday', 'carpress_wp'), 'Wed' => __('Wednesday', 'carpress_wp'), 'Thu' => __('Thursday', 'carpress_wp'), 'Fri' => __('Friday', 'carpress_wp'), 'Sat' => __('Saturday', 'carpress_wp'), ); $this->rotate_days( $start_of_week ); }
But the problem is that translation of this day names do not appear in front-end. Maybe there is something incompatible with Polylang? As theme support say, translation is working with WPML plugin. And all other content in this theme is translated well.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Can't translate Carpress WP theme widget’ is closed to new replies.