@paroicms/formatting-plugin
v0.2.0
Published
French text formatting plugin for ParoiCMS
Readme
@paroicms/formatting-plugin
Formatting plugin for ParoiCMS.
This package is part of ParoiCMS.
This plugin automatically applies French typographical rules to text content when rendering pages in French language context.
License
Released under the MIT license.
French Formatting
The following rules are automatically applied to string-based fields when the content language is French (fr):
- Quote formatting: Converts English quotes (
"text") to French guillemets («\u202Ftext\u202F») - Punctuation spacing: Adds non-breaking thin spaces (
\u202F) before!,?,;, and: - Number formatting: Proper spacing for numbers with units (°, €, %, h, etc.)
- Name formatting: Correct spacing for initials and titles (M., Mme., J.-P.)
- Abbreviation formatting: Proper spacing for abbreviations and "etc."
Based on: https://www.lalanguefrancaise.com/articles/espace-insecable
Quote Formatting
"Hello"→«\u202FHello\u202F»
Punctuation Spacing
Hello!→Hello\u202F!Comment?→Comment\u202F?Oui; non→Oui\u202F; nonNote: important→Note\u202F: important
Number Formatting
25 °C→25\u202F°C5,5 %→5,5\u202F%12 345→12\u202F345(thousands separator)
Name and Title Formatting
M. Dupont→M.\u202FDupontJ. P. Martin→J.\u202FP.\u202FMartin
Abbreviation Formatting
etc. et→etc.\u202Fet, etc.→,\u202Fetc.
