Hello @vengr7262525,
For now this string untranslateble with Tutor yet.
Because this string not use standard i18l function by WordPress:
https://prntscr.com/14me50c
Hope that the plugin author will fix it soon.
– So to quick fix this bug you can write custom function in Child Theme then override templates in Child theme.
This is custom function for you: Copy & paste it into your-child-theme/functions.php
function my_child_theme_get_tutor_course_duration_context( $course_id = 0 ) {
if ( ! $course_id ) {
$course_id = get_the_ID();
}
if ( ! $course_id ) {
return '';
}
$duration = get_post_meta( $course_id, '_course_duration', true );
$durationHours = tutor_utils()->avalue_dot( 'hours', $duration );
$durationMinutes = tutor_utils()->avalue_dot( 'minutes', $duration );
$durationSeconds = tutor_utils()->avalue_dot( 'seconds', $duration );
if ( $duration ) {
$output = '';
if ( $durationHours > 0 ) {
$output .= sprintf( __( '%1$sh', 'child-theme-textdomain' ) . ' ', $durationHours );
}
if ( $durationMinutes > 0 ) {
$output .= sprintf( __( '%1$sm', 'child-theme-textdomain' ) . ' ', $durationMinutes );
}
if ( $durationSeconds > 0 ) {
$output .= sprintf( __( '%1$ss', 'child-theme-textdomain' ) . ' ', $durationSeconds );
}
return $output;
}
return false;
}
Then copy template: course-topics.php from plugin:
yoursite/wp-content/plugins/tutor/templates/single/course/course-topics.php
=> yoursite/wp-content/themes/your-child-theme/tutor/single/course/course-topics.php
Then file copied, open it & edit like this:
https://prntscr.com/14mg0ge
Then you can use Loco plugin to translate these string.
-
This reply was modified 3 years, 9 months ago by
vandung93.
-
This reply was modified 3 years, 9 months ago by
vandung93.