473,216 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

Change of natural language inside alt text?

On some of my English language webpages, I have images of Dutch books.
In the alt text for this image, I give the title of the book, for
example:

<img src="maan.jpg" alt="Cover of De reis naar de maan" />

Now I would like to indicate that the phrase 'De reis naar de maan' is
Dutch, for the profit of users with a screen reader and others who may
benefit from it. Unfortunately I can't use a <span lang="nl"> inside
the alt attribute. I could perhaps do something like

<img src="maan.jpg" lang="nl" alt="De reis naar de maan" />

but I guess that would mean that the natural language of the image is
Dutch, which is nonsense.

Is there any other way to indicate the language of an alt text, and
even a language change inside an alt text?

Thanks,
Garmt de Vries.
Jul 23 '05 #1
6 2842
On 8/9/04 10:37 am, Garmt de Vries wrote:
... I could perhaps do something like

<img src="maan.jpg" lang="nl" alt="De reis naar de maan" />

but I guess that would mean that the natural language of the image is
Dutch, which is nonsense.


That looks fine to me.

(From <http://www.w3.org/TR/WD-html40-970917/struct/objects.html#adef-alt>):
alt = cdata
For user agents that cannot display images, forms, or applets, this attribute
specifies alternate text. The language of the alternate
text is specified by the lang attribute.


--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #2
gd*****@hotmail.com (Garmt de Vries) wrote:
<img src="maan.jpg" alt="Cover of De reis naar de maan" />

Now I would like to indicate that the phrase 'De reis naar de maan' is
Dutch, for the profit of users with a screen reader and others who may
benefit from it. Unfortunately I can't use a <span lang="nl"> inside
the alt attribute.


<span lang="nl"><img src="maan.jpg" alt="Cover of De reis naar de maan"
/></span>

I'd suggest that "Cover of" isn't Dutch. Use "Omslag van" instead.

--
Spartanicus
Jul 23 '05 #3
Garmt de Vries wrote:
<img src="maan.jpg" alt="Cover of De reis naar de maan" />


<object data="maan.jpg" type="image/jpeg">
Cover of <cite xml:lang="nl">De reis naar de maan</cite>.
</object>

Support for <object> isn't as wide as for <img>, and IE does weird things
with scroll bars, but this should properly convey the information.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #4
gd*****@hotmail.com (Garmt de Vries) wrote:
<img src="maan.jpg" alt="Cover of De reis naar de maan" />

Now I would like to indicate that the phrase 'De reis naar de maan' is
Dutch, for the profit of users with a screen reader and others who may
benefit from it.
A noble goal, but HTML is too limited for that in practice (since
<object> is an impractical solution to embedding images in WWW
authoring). Besides, I'm afraid most speech-based user agents don't
support language switching very well, though the situation is improving.
I wonder if they support Dutch - they probably have a fairly limited
language repertoire.
<img src="maan.jpg" lang="nl" alt="De reis naar de maan" />

but I guess that would mean that the natural language of the image is
Dutch, which is nonsense.


By definition, the lang attribute specifies the language of the element's
content _and attributes_, so it would be OK. After all, an image _may_
have a language property; for example, a book cover probably contains the
name of the book, in a particular language. I doubt whether we'll ever
see user agents that are able to scan an image, recognize text in it, and
speak it, using the language information in the lang attribute. But
there's nothing illogical in the idea of using language information when
processing an image.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #5
In message <Xn*****************************@193.229.0.31>, Jukka K.
Korpela <jk******@cs.tut.fi> writes
gd*****@hotmail.com (Garmt de Vries) wrote:
<img src="maan.jpg" alt="Cover of De reis naar de maan" />

Now I would like to indicate that the phrase 'De reis naar de maan' is
Dutch, for the profit of users with a screen reader and others who may
benefit from it.


A noble goal, but HTML is too limited for that in practice (since
<object> is an impractical solution to embedding images in WWW
authoring). Besides, I'm afraid most speech-based user agents don't
support language switching very well, though the situation is improving.
I wonder if they support Dutch - they probably have a fairly limited
language repertoire.
<img src="maan.jpg" lang="nl" alt="De reis naar de maan" />

but I guess that would mean that the natural language of the image is
Dutch, which is nonsense.


By definition, the lang attribute specifies the language of the element's
content _and attributes_, so it would be OK. After all, an image _may_
have a language property; for example, a book cover probably contains the
name of the book, in a particular language. I doubt whether we'll ever
see user agents that are able to scan an image, recognize text in it, and
speak it, using the language information in the lang attribute. But
there's nothing illogical in the idea of using language information when
processing an image.

Couldn't try it in Dutch ..... but the same concept (lang="xx" in the
<IMG> tag) works OK in French.

regards.

--
Jake
Jul 23 '05 #6
gd*****@hotmail.com (Garmt de Vries) wrote in message news:<52**************************@posting.google. com>...

Is there any other way to indicate the language of an alt text, and
even a language change inside an alt text?


Thanks, all, for your comments. I think I'll stick with what I had.
I'm not too keen on using <object> instead of <img>. Also, I'd like to
let viitors of these English pages know that the image is a cover of a
book, so I should write "Cover of" rather than "Omslag van". This way,
the title itself won't be pronounced properly, but it wasn't really
going to be anyway, since Dutch is probably not widely supported by
speech browsers...

Garmt de Vries.
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andrew E | last post by:
Hi all I've written a python program that adds orders into our order routing simulation system. It works well, and has a syntax along these lines: ./neworder --instrument NOKIA --size 23...
4
by: Christiaan | last post by:
I am trying to create a small javascript to change the button text and then submit it and do all kinds of form validations. So I have a button with the value "Save", when the button is clicked it...
4
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an...
8
by: Roman | last post by:
Hello i got this simple problem using nhibernate. I want to chang the id( primary key of the) object and update it, to change this key. i me getting nhibernate exception like this: identifier...
7
by: David | last post by:
Hi, I'd really appreciate any help. Im trying to change a label over and over again. I can change it the first time, by using the following code, however it never works again, how can i do this...
1
by: Hendri Adriaens | last post by:
Hi, I have an onmouseover script that displays a div with some comment. There are several links getting this onmouseover functionality, all with their own comment text. Now I want the div to...
4
by: snipes2002 | last post by:
hi all i have a homework but am not so good in java so i need some help !! i have to do a text box and put in it a pattern and there is a big text box under it so when i put a pattern in the first...
1
by: Steven Bird | last post by:
NLTK the Natural Language Toolkit is a suite of open source Python modules, data sets and tutorials supporting research and development in natural language processing. It comes with 50k lines...
0
by: sivamedia | last post by:
hai to all I want to Translate the given English Text into some other language for Example English - French, English - Hindi etc. i found that 1)we have to enter the database of each and...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.