473,834 Members | 1,682 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2898
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#ad ef-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***********@v irgin.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">D e 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.tu t.fi> writes
gd*****@hotmai l.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.go ogle.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
2197
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 --price MARKET --repeats 20 etc However, I'd like to add a mode that will handle, say:
4
3622
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 should change into "Are you sure" and when you then click the button the form must be submitted. I know this is possible using a simple dialog box but I want to this it this way. This is what I already have, if you have any suggestions please...
4
2644
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 QA tested for a new year release. I don't think that going to prove practical, but there is no harm in trying :) and some serious family commitments. But it has to be done soon so this is stage one. Mike Winter provided an extensive list of...
8
8479
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 of an instance of {0} altered from {1} ({2}) to {3} ({4}) // in place of number, there are values and their types. can anyone help me?
7
2101
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 so it uses the same element name? This is driving me insane. On the second call to var spanElm = document.getElementById("FirstNameLengthLabel"); spanElm is set to NULL. <script language=javascript>
1
1764
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 have a max width, but if the natural width is smaller than the max width, it should get the natural width. commentObj is the div and commentObj.offsetWidth returns the natural width, as long as we didn't set it to anything else (it seems). As soon as...
4
1741
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 box and text in the second one and i push a button (find) the words that matches the pattern must be highlighted !! this is half of the H.W the other half on the same interface i have to inter the date it must be in this form (dd/mm/yy or dd-mm-yy) ...
1
2636
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 of code, 300Mb of datasets, and a 360 page book which teaches both Python and Natural Language Processing. NLTK has been adopted in at least 40 university courses. NLTK is hosted on sourceforge, and is ranked in the top 200 projects. ...
0
1885
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 every words and sentenses in required language in XML file and then we compare english text with the other coressponding language and get it
0
9796
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10504
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10544
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10214
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3079
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.