Created attachment 93582 [details] Simple test case; resize window to see different hyphenation points If I'm using the CSS3-propery hyphens:auto; I get rather confusing results: On Safari on iOS all texts are hyphenated using the rules for the system language; regardless of the language of the hyphenated text. On Webkit (Nightly 6533.21.1, r86499) hyphenation is only performed when the system language of OS X is set to 'English'. I'd expect a) Safari on iOS not to hyphenate text in an other language (i.e. when there's a lang-attribute with an other language). b) Either Webkit on Mac OS X having other hyphenation patterns than just English or support for 'hyphenate-resource' to be able to load patterns.
Comment on attachment 93582 [details] Simple test case; resize window to see different hyphenation points ><!DOCTYPE HTML> ><html lang="en"> > <head> > <title>Test1</title> > <meta http-equiv="content-type" content="text/html; charset=UTF-8"> > <style type="text/css"> > body { > width:50%; > margin-left: 25%; > margin-right: 25%; > } > .hyphenate { > -webkit-hyphens:auto; > } > </style> > </script> > </head> > <body> > <h2>Paragraph with lang="de" is hyphenated with english patterns</h2> > <p class="hyphenate" lang="en"> > A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. > </p> > <p class="hyphenate" lang="de"> > Eine wunderbare Heiterkeit hat meine ganze Seele eingenommen, gleich den süÃen Frühlingsmorgen, die ich mit ganzem Herzen genieÃe. > </p> > </body> ></html>
You are right that TOT WebKit does not consider the 'lang' attribute when applying hyphenation, and does not support external hyphenation resources. In WebKit nightly builds, you can specify the '-webkit-locale' CSS property to control hyphenation.
In OS X Lion, auto-hyphenation is supported for English (US and GB), German, French, Italian, Dutch and Russian.
Nice, thanks!