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 have a multilingual site where I use Advanced Sort Options, like these:
Post date Desc|Newest first
Price Asc|Lowest Price
The problem is that "Newest first" and "Lowest Price" remain untranslatable into other languages.
Comments
Comment #1
Martin. CreditAttribution: Martin. commentedThis is still an issue. Any updates ?
Comment #2
mikeker CreditAttribution: mikeker commentedThe main problesm that
t()
is not supposed to be used with variables. Specifically:Granted the XSS opening would only be for those with Administer Views permissions.
I'm not sure how to handle this, but I'm open to any suggestions/advice/pointers. Thanks.
Comment #3
mikeker CreditAttribution: mikeker commentedI knew this issue sounded familiar: #1670140: Translate replacement_value in sort options and in filter options. Are you using the latest release of BEF?
Currently translation is only available for exposed sort rewrites and should be extended to exposed filter rewrites as well.
Comment #4
heddnMarking as duplicate of #2185077: Allow translations for all BEF settings
Comment #5
sgurlt CreditAttribution: sgurlt commentedCould you give an example how the translated string should look like? I found this on the string translation page:
Distance Asc|Distance Distance Desc| Date Asc|Date Date Desc|
When I try to change it to german:
Distance Asc|Entfernung Distance Desc| Date Asc|Datum Date Desc|
Nothing happens.
Comment #6
heddnSee the duplicate issue. #2185077: Allow translations for all BEF settings