XML language

The xml:lang attribute is loosely related to the issue of character sets, in that they both contribute to supporting an application's ability to present information in different languages. The xml:lang attribute it not vital, but is useful because it tells the application which language the encoded text is in, and this may affect the way the application displays and breaks lines.

Even the country code that this attribute is able to hold can have an effect on presentation. Some applications include use dictionaries of hyphenation rules to ensure that words which break over lines are broken at reasonable points. Each country may have its own hyphenation dictionary.

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.