Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2006-11-25 15:38:00

tore
Member
From: Tväråmark, Sweden
Registered: 2006-11-08
Posts: 26

Re: localised typography for Textile

Swedish

For proper typography in Swedish little has to be modified; only that opening quotes are written like closing quotes: ”like this” and like ’that’.

P.S. Btw, couldn’t the hyphen be converted to – always after whitespace in order to serve as a better minus sign in numeric values?

Last edited by tore (2006-11-25 16:22:08)

Offline

#26 2006-11-26 13:31:40

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: localised typography for Textile

En-dash isn’t for math.

Offline

#27 2006-11-26 13:51:41

tore
Member
From: Tväråmark, Sweden
Registered: 2006-11-08
Posts: 26

Re: localised typography for Textile

OK, true, just that the visual similarity may justify an easier method than using

− or & #8722;

in negative-number-intense texts …

Offline

#28 2006-12-28 04:34:29

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: localised typography for Textile

I have missed this thread. So, first, a small file including a diff .patch for French typo rules. It’s only the basics, a couple may be missing.

Double punctuation

For every double punctuation sign (: ; ? !) French use a space before the sign, and to avoid being pushed on the next line this space need to be non-breaking (in theory it’s the fine non-breaking space, but almost all browser don’t understand it). These may be (it’s the simplest thing, and easy to correct in a workflow scheme) input like this:

sp:sp

(where “sp” is a space)

and would produce:

nbsp:sp

This is taken care of in the file linked above, using a regexp that is svn update friendly.

Quotes

The basic quotes are «». The double opening quote should be followed by a nonbreaking space, and the double closing quote should have one before it. A rare second level of quotes is used, it’s the same as the English ones, plus the nbsp. The quotes are input using the dumb straight computer quote <notextile>”</notextile>, and using the dumb <notextile>’</notextile> for the second level quote is fine. This is all doable right now with the define scheme.

en dash

en dashes are used in French like the em dashes in US english, like a “soft” parenthesis. It need nbsp around it (before and after). It’s input like this:

sp-sp

meaning, space, dumb <notextile>-</notextile>, space.

It’s doable right now in define but the standard space around it are hard coded later, so a little hack is needed here.

Upper case diacritic

In French, we have several letters that use accent (eaoui). Because of the typewriter and the dumb computers, they aren’t easily available for upper case letters on a modern keyboard, but they can be misleading (some word don’t mean the same thing with or without the accent). Same goes with ligature (æ and œ, and the same in upper case). However, Textile has no way of guessing. So the only solution is to have a “insert special characters” javascript tool, like Wikipedia does.

That’s all I can think of right now.

Last edited by Jeremie (2006-12-28 04:52:17)

Offline

#29 2008-02-28 11:17:12

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: localised typography for Textile

I recently noticed the localisation files now contain a block:

txt_quote_double_close => ”
txt_quote_double_open => “
txt_quote_single_close => ’
txt_quote_single_open => ‘

That seems to address this problem for the quotes. It’s been around since txp 4.0.4, but I hadn’t seen it mentioned anywhere – nice! :-)

Offline

#30 2008-02-28 11:58:52

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: localised typography for Textile

masa wrote:

That seems to address this problem for the quotes. It’s been around since txp 4.0.4, but I hadn’t seen it mentioned anywhere – nice! :-)

There’s a reason why it hasn’t been mentioned anywhere: It does not cover some very common edge cases, like "I'm running out of 9" nails" or 's the season! and similar quote constellations.

Offline

#31 2008-03-11 14:57:23

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: localised typography for Textile

OK, I just had a go at this.
I used a copy of en-gb.txt as I want to keep the interface in English and then modified the relevant lines to use Icelandic quote marks:

txt_quote_double_close => “
txt_quote_double_open => „

… but it didn’t have any effect. Textile still converts straight quotes to English-style quotes. The lang file was saved and uploaded as utf-8.

Why doesn’t it work?

Offline

#32 2008-03-11 15:04:31

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: localised typography for Textile

I think you have to edit classTextile.php in the /lib directory.

Offline

#33 2008-03-11 15:29:45

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: localised typography for Textile

Fantastic Ruud, that did the trick – thanks very much! :-)

Now I only wonder, what’s the purpose of these entries in the lang file, if they don’t have an effect?

Offline

#34 2008-03-11 17:07:21

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: localised typography for Textile

gTxt("txt_quote_double_close"), that’s why. Language files have no efect to the user’s output nor Textile, but it do change how lang-strings are shown. But I don’t have no clue where those quotes are used.

Offline

#35 2008-03-11 17:17:58

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: localised typography for Textile

Gocom wrote:

gTxt("txt_quote_double_close"), that’s why. Language files have no efect to the user’s output nor Textile, but it do change how lang-strings are shown. But I don’t have no clue where those quotes are used.

I see, I misunderstood what it’s for and got unduly excited,… wouldn’t be the first time. ;-)

Offline

Board footer

Powered by FluxBB