azuyalabs / yasumi

The easy PHP Library for calculating holidays
https://www.yasumi.dev
Other
1.04k stars 152 forks source link

French Text in translation file in newYearsDay.php #251

Closed oxomichael closed 3 years ago

oxomichael commented 3 years ago

I found that in the file src/Yasumi/data/translations/newYearsDay.php

'fr' => 'Jour de l’An',

Can the quotation mark be replaced by a good quotation mark useable in the database ?

As this

'fr' => 'Jour de l\'An',

oxomichael commented 3 years ago

Finally i see this quotation mark everywhere....

stelgenhof commented 3 years ago

Hi @oxomichael Actually the use of a straight apostrophe is in this case incorrect. For quotes as in your example the proper one to use is the typographic quote/apostrophe. See https://practicaltypography.com/straight-and-curly-quotes.html and the related PR: https://github.com/azuyalabs/yasumi/pull/197

You say you want to use the straight quote for storing in the database. Could you explain a bit why the typographic form would cause in issue in the database?

Cheers! Sacha

oxomichael commented 3 years ago

Ok I read the explanation for a good typo and I have several database not in UTF-8 and sometimes it's the front. As ISO-8859-1 or ISO-8859-15.

You can also enter curly quotes into HTML documents using the key shortcuts above. They’re non-ASCII glyphs, however, so you need to specify a non-ASCII encoding for the file (like UTF‑8), otherwise they’ll get garbled on decode.

I found a workaround for now.

stelgenhof commented 3 years ago

Good! I work a lot with CMS applications and often this is misunderstood when content contains such an apostrophe.