ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Changing the way Typography works

July 06, 2007 4:25am

Subscribe [2]
  • #1 / Jul 06, 2007 4:25am

    cyner

    3 posts

    Since the Typography class is made for the English-speaking world, I need to make some small adjustments for Swedish. How would I do this? An extension?

    These are the changes I want to do:

    * The em-dash is never used in Swedish—only the en-dash, and always with surrounding spaces. So, I would replace all “—” with en-dash, and perhaps “—-” with em-dash for English quotes.

    * We always use the right-hand quotation marks—even on the left side!

    The “ugly hack” I can think of is to create a plugin to wrap all my content with, that replaces left quotes with right quotes, em-dashes and “—” with en-dashes. But I don’t like that idea.

  • #2 / Jul 06, 2007 5:56am

    Ingmar

    29245 posts

    You might want to support this feature request. Perhaps adding that you would like to be able to specify the opening and closing typographical quotes as well. The French, eg, use << >> instead of curly quotes.

    EDIT: There is another thread.

  • #3 / Jul 06, 2007 6:04am

    cyner

    3 posts

    Thanks, Ingmar. I’m willing to create a reusable “thing”, but what kind of “thing” would be most appropriate? I’m an experienced PHP programmer, but relatively new to ExpressionEngine.

    Should it be a module, plugin, extension or ugly hack?

  • #4 / Jul 06, 2007 6:21am

    Ingmar

    29245 posts

    Actually, as a far as feature requests go, this should, in my opinion, be addressed by EllisLabs. As to an extension, I am not sure that the necessary hooks are in place, but if they are, this’d be the way to go.

  • #5 / Jul 07, 2007 6:25am

    cyner

    3 posts

    Ok, I have an extension for testing now. It seems to work with Markdown and xhtml, and should work with others as well. Please let me know if it works or doesn’t work for you.

    This test version has these hardcoded replacements (it may be possible to customize this in the future):

    -- -> – (–)
    --- -> — (—)
    " -> ” (”)
    ' -> ’ (’)

    Unfortunately, article titles always use lite_xhtml, and there are no hooks there.

  • #6 / Jul 09, 2007 9:38am

    Ingmar

    29245 posts

    Nice, I like.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases