• Resolved Romanowitsch

    (@romanowitsch)


    hey everybody,

    in order to avoid those long gaps between the words I’m using the wonderful hyphenator plugin that automatically breaks the lines in my blog entries (which I’ve set to “justify”).

    So far everything worked just fine. But lately (still under WordPress 2.9) I downloaded a theme called “the morning after” (which is now hosted by woothemes).

    Unfortunately, the plugin does not recognize the site’s language when I use this theme (there is a window asking to select the language manually every time the site reloads).

    That doesn’t happen with all the other themes.

    Can anybody help me out with this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Romanowitsch

    (@romanowitsch)

    It’s alright, I solved it my own.

    For those having the same problem:

    I decided using another plugin for the same purpose (called “wp_typography”) which brings a lot more options with it and works fine with all themes installed.

    It looks like the HTML attribute for English language lang="en" is missing in your template. Without this the script can’t choose the right hyphenation table by itself. But it’s easy to add the attribute to the top HTML element <html> so that it looks like this: <html lang="en"> You should find and edit this code in the header.php in the folder of your template.

    A generic HTML element looks like this in the template source code: <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> It’s using some short PHP code and automatically reads the current WordPress settings.

    But besides that this is important for the Hyphenator.js engine, this is an advisable web standard and should always be used at well coded websites.

    By the way, the hyphenation technology behind wp-Typography and the server side concept has some disadvantages compared to the client side Hyphenator.js engine which is in ongoing and continuous development. But this is difficult to explain without being too technical. Apart from that the typography settings are really interesting.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hyphenator doesn't recognize site language’ is closed to new replies.