Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I couldn't find a way to make the beta 2 version translatable by default. So I altered the line
'#markup' => t(check_plain($range_data['label'])),
to
'#markup' => t(check_plain($range_data['label'])),
on line 87 in the date_facets_get_ranges function.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2226429-date_facets_not_translatable-4.patch | 416 bytes | juhaniemi |
Comments
Comment #1
eugene.ilyin CreditAttribution: eugene.ilyin commentedCommited to dev version.
Comment #4
juhaniemi CreditAttribution: juhaniemi at Wunder commentedInidividual facets were still not translatable. I had to run the label through t() aswell.
Comment #5
eugene.ilyin CreditAttribution: eugene.ilyin commentedComment #7
eugene.ilyin CreditAttribution: eugene.ilyin commentedSorry, but I was wrong. We can't use t() for facet label, because administrator can type text on any language. We should use i18n_string module to translate facet labels.
@juhaniemi, sorry, but I don't understand what is individual facet and why it requires code from your patch.
Comment #8
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedSo, I'm closing issue. Don't hesitate to open it again if you will have problems.
Comment #9
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commented