WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

JSM's Non-Breaking Space for French Content

Adds a non-breaking space between words and punctuation marks to avoid inappropriate line-breaks in French.

This plugin adds non-breaking spaces required by the French language in the content, excerpt, comments, and text widget — skipping over pre-formatted code blocks, styles and scripts.

If the <!--:fr--> HTML tag is found (used by some multilingual plugins), non-breaking spaces are added only between the <!--:fr--> and <!--:--> HTML tags.

There are no plugin settings — simply install and activate the plugin.

Filters for Developers

'nbsp_french_add_filters' ( array $names ) — An associative array of filter names (and their priority number) to hook by default.

'nbsp_french_currencies' ( $pcre ) — A list of recognized currencies.

'nbsp_french_preg_first_second_last' ( array $pattern ) — An array of patterns to match. Spaces are replaced in the second set of parenthesis, and the returned string corresponds to the first, second, and last set of parenthesis.

To hook additional filters, include their names and priority in the 'nbsp_french_add_filters' array, or hook them individually in your functions.php file:

add_filter( 'your_filter_name', array( 'NbspFrench', 'filter' ) );

Requires: 3.7 or higher
Compatible up to: 4.7.1
Last Updated: 6 days ago
Active Installs: 100+

Ratings

5 out of 5 stars

Support

2 of 2 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1 100,1,1
100,1,1
100,1,1
100,1,1
100,1,1 100,1,1 100,1,1
100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1