BEF now has full support for translation of any text used in the BEF settings form.

NOTE: if you were using the I18N Strings module to translate exposed sort rewrite strings, you will need to redo your configurations using core's Locale module. Basically translations created between 30 Jan, 2014 and 27 March, 2015 will need to be redone.

To create translations for BEF settings

First, enable the Locale module and configure the languages you wish to translate into at admin/config/regional/language. This is the same as you would do for any localized site build.

If the strings are in an existing view:

  1. Edit the view containing the strings you wish to translate.
  2. Open the BEF settings form (in the Advanced section, click on "BEF settings") and click the Apply button without making any changes.
  3. Save the view (again, without making any changes).
  4. Navigate to admin/config/regional/translate/translate and the BEF settings strings should be available for translation.

If you are building a new view, the strings will be available once the view is saved.

When entering translations for fields that depend on the newline character -- any of the rewrite settings, for example -- the newline character is stripped when displaying the default language text. However the translations MUST HAVE A NEWLINE for it to work correctly. It should look just the same as in the BEF settings form. See the example below.

If you are editing the .po files directly, ensure there is a \n in your translations. See this comment for more details.

Credit

Drupal users heddn and berliner deserve much of the credit for for translation in BEF. Thank you for your patches!

AttachmentSize
bef-translation.jpg161.23 KB

Comments

fhelms’s picture

Same with me. It is not working (any more ?) with 3.2
I tried to translate the "Override "Any" option label" - it appears in the translate section - though translations are not shown on the rendered page.
Additionally I am using views transalations (i18nviews) 7.x-3.0-alpha1

ykyuen’s picture

same problem for 7.x-3.6

tibit’s picture

can confirm "Override "Any" option label" is not working bef Version: 7.x-3.5 on D 7.61

tibit’s picture

here is a fix

better_exposed_filters_exposed_form_plugin.inc:

-        $form[$filter_id]['#options']['All'] = $options['more_options']['any_label'];
+        $form[$filter_id]['#options']['All'] = t($options['more_options']['any_label']);