473,387 Members | 1,440 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,387 software developers and data experts.

multiple languages in one document

I want to display different languages in a single web document, each
likely with a different encoding.

I found this:
http://www.w3.org/International/geo/...0112.213804197

Can anyone comment on where things are with displaying multiple
encodings/charsets on a single page?

Thank you.

epp

Jul 23 '05 #1
11 10466
In article <11**********************@g14g2000cwa.googlegroups .com>,
"enrique" <en************@gmail.com> wrote:
I found this:
http://www.w3.org/International/geo/...0030112.213804
197

Can anyone comment on where things are with displaying multiple
encodings/charsets on a single page?


The solution is using the UTF-8 encoding and declaring the language as
described on the above-mentioned page.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 23 '05 #2
Yes, I am aware of Unicode.

My question is about supporting two or more encodings in a single
document. I checked the XHTML DTD and it doesn't look like elements
support a "charset" attribute, with the exception of maybe four (link,
a, etc.).

Thank you.

epp

Jul 23 '05 #3
In article <11*********************@o13g2000cwo.googlegroups. com>,
"enrique" <en************@gmail.com> wrote:
My question is about supporting two or more encodings in a single
document.


Not supported.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 23 '05 #4
Dan

enrique wrote:
Can anyone comment on where things are with displaying multiple
encodings/charsets on a single page?


You can't.... you'll have to either use an encoding that encompasses
all desired characters (e.g., UTF-8, which supports the entire Unicode
range), or else use named entities or numeric references to include
characters outside the encoding in use.

--
Dan

Jul 23 '05 #5
On Sat, 19 Mar 2005, Henri Sivonen wrote:
"enrique" <en************@gmail.com> wrote:
My question is about supporting two or more encodings in a single
document.


Not supported.


Since there's no mechanism for changing encoding in the middle of a
single document, I'd say it's not just a matter of "not supported",
but rather that there's nothing to support!!

However, the Subject: says that the question is about "languages" -
but "character codings" and "languages" are defined in HTML to be
independent of each other, so maybe the questioner has a deeper
problem than the one which you're trying to answer.
Jul 23 '05 #6
enrique wrote:
Yes, I am aware of Unicode.
Is there a reason why unicode is not appropriate for your needs?
My question is about supporting two or more encodings in a single
document.
That can't be done, however there is no need to do so. UTF-8, which is
one encoding of the Unicode character repertoire, should provide all the
characters you need.
I checked the XHTML DTD and it doesn't look like elements
support a "charset" attribute, with the exception of maybe four (link,
a, etc.).


If I understand you correctly, the charset attribute doesn't do what you
think it does.

eg. with this markup, in a document encoded as UTF-8:

<a href="document.html" charset="Big5">Document</a>

That is an advisory hint that document.html is encoded in Big5, and the
user agent should use that encoding in the absense of any other charset
indication, such as the Content-Type header field or meta element. It
does not indicate that the content of the <a> element ("Document" in
this case) is encoded in Big5, it is still encoded in the same character
encoding as the rest of the document.

The W3C I18n group has published some useful character encoding and
language related resourses.
http://www.w3.org/International/reso...x.html#charset
http://www.w3.org/International/reso...ndex.html#lang

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jul 23 '05 #7
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> wrote:
However, the Subject: says that the question is about "languages" -
but "character codings" and "languages" are defined in HTML to be
independent of each other, so maybe the questioner has a deeper
problem than the one which you're trying to answer.


The questioner has probably confused languages with encodings, which is
not surprising at all. But the real question might not be that deep.
In fact I suspect the real problem is "how do I write different
characters on a page comfortably", i.e. an authoring tool question.
Maybe a good Unicode editor is the solution. Or maybe some conversion
tools are needed, if one needs to combine existing texts that are in
different encodings now. (They could be converted to UTF-8 and then put
together.)

This being said, it needs to be reminded that mixing two or more
languages in one document is usually a mistake. Especially on the Web,
it is better to put each language version into a document of its own.
Language mix is mainly needed for link texts that are used to link the
different language versions to each other, and in documents that teach
or discuss languages. (Even in a scientific presentation where one
quotes a text in a different language, it might be best - on the Web -
to include just a translation of the quoted text, and add a link to the
original.)

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

Jul 23 '05 #8
enrique wrote:
Yes, I am aware of Unicode.

My question is about supporting two or more encodings in a single
document. I checked the XHTML DTD and it doesn't look like elements
support a "charset" attribute, with the exception of maybe four (link,
a, etc.).

Thank you.

epp

If I remember correctly most of the elements to support a language
(lang) attribute, but I havent worked with XML or XHTML for a while.

I believe it is possible to present multiple encodings on a single page,
but it will be a bit tricky and involve embedding objects into it. Use
google to search for solutions for the platform you are using. Include
PHP in your search as it is available for all platforms.
Jul 23 '05 #9
Ståle Sæbøe <ot*****@tdz.no> wrote:
If I remember correctly most of the elements to support a language
(lang) attribute, but I havent worked with XML or XHTML for a
while.
The lang attribute has absolutely nothing to do with character
encoding, which is what was discussed here. And in X(HT)ML, you are not
supposed to use it but the xml:lang attribute (which is even more
widely ignored by browsers than the lang attribute).
I believe it is possible to present multiple encodings on a single
page,
It isn't, as explained before in this thread.
but it will be a bit tricky and involve embedding objects
into it.


You can embed a page in another, but that does not make either of the
page contain multiple encodings. Besides, this fictitious solution to a
non-problem creates real problems: either the embedded page appears
visually as a separate page appearing inside a "subwindow", which is
most probably not desired, or you use CSS to hide this fact and cause
quite some trouble when the user thinks there's one page and
functionally (e.g. in saving, tabbing, link following, etc.) there
isn't.

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

Jul 23 '05 #10
Jukka K. Korpela wrote:
Ståle Sæbøe <ot*****@tdz.no> wrote:

If I remember correctly most of the elements to support a language
(lang) attribute, but I havent worked with XML or XHTML for a
while.

The lang attribute has absolutely nothing to do with character
encoding, which is what was discussed here.

How nice of you to point that out. Still not exactly off topic in my
opinion.
And in X(HT)ML, you are not
supposed to use it but the xml:lang attribute (which is even more
widely ignored by browsers than the lang attribute). In the link supplied by the original poster, w3 emphasizes the
importance of the lang attribute. Why are you not supposed to use it? It
seems immensely useful to me for a multi language page.
You can embed a page in another, but that does not make either of the
page contain multiple encodings. Besides, this fictitious solution to a
non-problem creates real problems: either the embedded page appears
visually as a separate page appearing inside a "subwindow", which is
most probably not desired, or you use CSS to hide this fact and cause
quite some trouble when the user thinks there's one page and
functionally (e.g. in saving, tabbing, link following, etc.) there
isn't.

Alright alright, geeze. I was just exploring the possibility. What is
with the attitude on these groups?
Jul 23 '05 #11
Ståle Sæbøe <ot*****@tdz.no> wrote:
Alright alright, geeze. I was just exploring the possibility.
Explored how? What you posted here was not any exploration. It was a
suggestion to use a non-solution to a non-problem.
What is with the attitude on these groups?


Post nonsense, read comments that say it's nonsense. Then, optionally,
start whining, or start learning things. Your choice.

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

Jul 23 '05 #12

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

Similar topics

5
by: CM | last post by:
Hi, there: I have some questions, I hope someone can briefly describe how ASP (not ASP.Net) to do the following things: 1) Get real-time information from other web site such as tracking via...
3
by: Lars G. Svensson | last post by:
Currently, I'm marking up a few pages in German, containing quite some English abbreviations. The abbreviations are marked up as <abbr> with the appropriate title attribute, and -- when appropriate...
3
by: Tom Kelleher | last post by:
Question: Can namespaces be shared by several projects within a solution, if those projects use different languages? We wrote some db code in C#, and some biz logic in VB.NET. We brought both...
0
by: Mahita | last post by:
Hi All, My requirement is that I need to display in the same page/document some text in English and some other text in localized language (French, german etc). Can you please let me know whether...
15
by: John Salerno | last post by:
After my last post, I thought of another question as a result of the following: ------------------------------ Mike Meyer wrote: > John Salerno <johnjsal@NOSPAMgmail.com> writes: > > >>So...
0
by: Josh K. | last post by:
Whats the best way to support multiple languages in a 3 tier .NET app? SQL server on the back end using National values NVARCHAR, NTEXT, etc.. a .NET component in the middle tier and then ASP.NET...
7
by: swethasivaram | last post by:
Hello I have a Java-based web application whose interface can be in multiple languages. My requirement is that the javascript alerts that I display should be displayed in the language in which...
1
by: leimeisei | last post by:
Hi, I've been writing an app, but have recently discovered the need to go multilingual (I need primarily German). So, I was wondering, what is the best way to implement multiple languages in a C#...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.