Title: Filter option language
Last modified: June 5, 2018

---

# Filter option language

 *  Resolved [sibichan](https://wordpress.org/support/users/sibichan/)
 * (@sibichan)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/filter-option-language/)
 * I wanted to translate the following to French. Where i can edit this?
 * Filter by Preacher
    Filter by Series Filter by Topic Filter by Book

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/filter-option-language/#post-10376873)
 * Hi there,
 * You can translate those strings by adding the following code at the end of your(
   child) theme’s `functions.php`:
 *     ```
       add_filter( 'gettext', 'change_sermon_filtering_labels', 20, 3 );
       /**
        * Change filtering labels.
        *
        * @param string $translated_text Translated text.
        * @param string $text            Text to translate.
        * @param string $domain          Text domain.
        *
        * @return string Translated string.
        */
       function change_sermon_filtering_labels( $translated_text, $text, $domain ) {
       	if ( 'sermon-manager-for-wordpress' !== $domain ) {
       		return $translated_text;
       	}
   
       	switch ( $text ) {
       		case 'Filter by Series':
       			$translated_text = ''; // Translated string here, between quotes.
       			break;
       		case 'Filter by Topic':
       			$translated_text = ''; // Translated string here, between quotes.
       			break;
       		case 'Filter by Book':
       			$translated_text = ''; // Translated string here, between quotes.
       			break;
       		case 'Filter by Service Type':
       			$translated_text = ''; // Translated string here, between quotes.
       			break;
       	}
   
       	return $translated_text;
       }
       ```
   
 * Thank you for your patience.
 *  Thread Starter [sibichan](https://wordpress.org/support/users/sibichan/)
 * (@sibichan)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/filter-option-language/#post-10381004)
 * Filter by Preacher not changing. I added like below. but its not translating
 * case ‘Filter by Preacher’:
    $translated_text = ‘Filtrer par prédicateur’; // 
   Translated string here, between quotes. break;
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/filter-option-language/#post-10381888)
 * Hi, my apologies, I have made a small mistake.
 * Please replace that section with:
 *     ```
       case 'Filter by %s':
       	$translated_text = ‘Filtrer par %s’; // Translated string here, between quotes.
       	break;
       ```
   
 * And then please put “prédicateur” in Sermon Manager Settings -> “Custom label
   for “Preacher”” setting.
 *  [neal514](https://wordpress.org/support/users/neal514/)
 * (@neal514)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/filter-option-language/#post-10749061)
 * I’m working on changing the archive page filters to Chinese… I have used the 
   above code with the Chinese in the quotation marks… but nothing is changing. 
   any reason why this is not working? I was able to change the speaker drop down
   by changing it in the setting, but i have copied the above code with the chinese
   filter names in it to my child theme function.php but nothing seems to be changing.
 * [http://www.zhenzhujinxin.com/?post_type=wpfc_sermon](http://www.zhenzhujinxin.com/?post_type=wpfc_sermon)
    -  This reply was modified 7 years, 6 months ago by [neal514](https://wordpress.org/support/users/neal514/).
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/filter-option-language/#post-10759698)
 * Hi [@neal514](https://wordpress.org/support/users/neal514/),
 * Here is the updated code. Preacher label can only be changed via settings.
 *     ```
       add_filter( 'gettext', 'change_sermon_filtering_labels', 20, 3 );
       /**
        * Change filtering labels.
        *
        * @param string $translated_text Translated text.
        * @param string $text            Text to translate.
        * @param string $domain          Text domain.
        *
        * @return string Translated string.
        */
       function change_sermon_filtering_labels( $translated_text, $text, $domain ) {
       	if ( 'sermon-manager-for-wordpress' !== $domain ) {
       		return $translated_text;
       	}
   
       	switch ( $text ) {
       		case 'Series':
       			$translated_text = ''; // Translated string here, between quotes.
       			break;
       		case 'Topic':
       			$translated_text = ''; // Translated string here, between quotes.
       			break;
       		case 'Book':
       			$translated_text = ''; // Translated string here, between quotes.
       			break;
       		case 'Service Type':
       			$translated_text = ''; // Translated string here, between quotes.
       			break;
       	}
   
       	return $translated_text;
       }
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Filter option language’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sermon-manager-for-wordpress_688896.
   svg)
 * [Sermon Manager](https://wordpress.org/plugins/sermon-manager-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sermon-manager-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Nikola](https://wordpress.org/support/users/nikolam/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/filter-option-language/#post-10759698)
 * Status: resolved