L
L
ligisayan2017-03-17 11:50:32
Calendar
ligisayan, 2017-03-17 11:50:32

The problem with localization - why is a fragment of text on the site not translated?

Hello! There is a wordpress site with a calendar plugin installed. Everywhere I set up localization translations, everything is fine, with the exception of this fragment, which is displayed through the widget (not translated), although there is definitely a corresponding entry, there are no others to search for

function tribe_events_get_this_week_title( $start_date ) {
  $events_label_plural = tribe_get_event_label_plural();
  $date_format = apply_filters( 'tribe_events_pro_page_title_date_format', tribe_get_date_format( true ) );

  $this_week_title = sprintf( __( '%s for week of %s', 'tribe-events-calendar-pro' ),
    $events_label_plural,
    date_i18n( $date_format, strtotime( $start_date ) )
  );

  return $this_week_title;
}

If you write it like this, then of course everything will be displayed, but this is not the most successful way to solve the problem.
$this_week_title = sprintf( '%s на неделе с %s',
    $events_label_plural,
    date_i18n( $date_format, strtotime( $start_date ) )
  );

How can you decide?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zorca, 2017-03-17
@zorca

Make a translation in the text domain of the template.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question