Replies: 6 comments
-
That's not directly related to hyphenation, but rather to "Smart Diacritics". Currently only US English (the default) and German are supported for this setting. For other languages, you should disable this setting (and there may be false replacements even for those two, this is something you have to decide if you want to risk enabling it). $settings->set_smart_diacritics( false ); should fix the issue (assuming |
Beta Was this translation helpful? Give feedback.
-
I am using the php-typography project as a requirement for another Drupal module, so I need to find out where/how to pass these settings. Can I somehow disable this for one language and keep it enabled for another? Thanks for your reply |
Beta Was this translation helpful? Give feedback.
-
Since you can have as many separate |
Beta Was this translation helpful? Give feedback.
-
@bserem After thinking about this, I'd simply disable the setting even for German. It's main use is adding proper diacritics to some French loan words. This is something a compentent copy writer will do by themselves. Also, loan words tend to lose their accents as they become more integrated into the host language, so re-adding diacritics is a very normative approach. Regarding the passing of options to the module: See the "Configuration" section in the Twig Typography documentation. Apparently a YAML file called |
Beta Was this translation helpful? Give feedback.
-
@mundschenk-at thanks, both for the definition of smart_diacritics (I didn't knew it) and for the support. I am attempting to get these into the project. Will post back upon success! |
Beta Was this translation helpful? Give feedback.
-
As pointed out by mundschenk-at, adding this: Thanks for the support! |
Beta Was this translation helpful? Give feedback.
-
I stumbled upon a problem with French language and this led me to the idea that it would be nice to allow custom values to be passed to the hyphenation.
Hyphenating this text:
Avec le Valais, on ne sait jamais à quoi s'attendre
Results into this:
Avec le Valais, on né sait jamais à quoi s'attendre
Notice the
né
vs thene
. A sign is added above the e.My client says this is not correct (and since I do not remember my French I take his word for granted).
Is there any way to pass custom hyphenation configuration to the hyphenator?
same question posted: https://www.drupal.org/project/twig_typography/issues/2950828
Beta Was this translation helpful? Give feedback.
All reactions