Comment 8 for bug 170340

Revision history for this message
Amelia Bellamy-Royds (ameliabr) wrote :

Bumping this!

Title and Desciption

Inkscape now has good support (through object properties dialog) for <title> and <desc>.

You can also set a document <title> in Document properties > Metadata, although its harder to find. For full SVG compliance, Inkscape should prompt the user to enter a document title on save -- and not just for certain OSes! The SVG 1.1 specs say "Authors should always provide a ‘title’ child element to the outermost svg element within a stand-alone SVG document." http://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements

Language declarations

I have not found any support for setting xml:lang, although the CSS code (cr-sel-eng.c) uses existing xml:lang attributes in order to match the :lang() pseudoclass selector.

Benefits of having xml:lang support:
- accessibility (for screen readers and translation tools)

- correct text rendering (would need to coordinate with underlying text layout libraries, but for some scripts you need to specify the language to get the correct rendering of a given string of Unicode characters)

- potential to have added language-based features such as spell-checking. Someone already has a TODO in text-edit.cpp -- if there is an easy way to assign a language to a text node, gtkspell can be used for spell checking.

I think that at the very least it should be straightforward to set a single xml:lang attribute on the document. There is a "Language" field in the document Metadata properties but it only sets the RDF data, not xml:lang. It's also open-ended (RDF/DC encourages the use of language codes, but does not require it). Ideally:

- the language metadata should create an xml:lang attribute on the root <svg>
- there should be some sort of restriction to ensure that the value is a correct language code -- e.g., using a drop-down list instead of a text field
- the language value should default to the user's preferred UI language, although maybe user preferences could set a different value (in case Inkscape isn't available in the user's primary language)
- the user should be prompted to correct the value when saving, at the same time as being prompted for a title

For better support of multi-lingual documents, you would need a way to set xml:lang on individual elements.

I've written up a broader discussion of language issues on the Wiki: http://wiki.inkscape.org/wiki/index.php/Language_support