multiple languages in one document

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • enrique

    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:


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

    Thank you.

    epp

  • Henri Sivonen

    #2
    Re: multiple languages in one document

    In article <1111182937.211 063.200280@g14g 2000cwa.googleg roups.com>,
    "enrique" <enrique.pineda @gmail.com> wrote:
    [color=blue]
    > 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?[/color]

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

    --
    Henri Sivonen
    hsivonen@iki.fi

    Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

    Comment

    • enrique

      #3
      Re: multiple languages in one document

      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

      Comment

      • Henri Sivonen

        #4
        Re: multiple languages in one document

        In article <1111184753.937 572.27420@o13g2 000cwo.googlegr oups.com>,
        "enrique" <enrique.pineda @gmail.com> wrote:
        [color=blue]
        > My question is about supporting two or more encodings in a single
        > document.[/color]

        Not supported.

        --
        Henri Sivonen
        hsivonen@iki.fi

        Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

        Comment

        • Dan

          #5
          Re: multiple languages in one document


          enrique wrote:[color=blue]
          > Can anyone comment on where things are with displaying multiple
          > encodings/charsets on a single page?[/color]

          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

          Comment

          • Alan J. Flavell

            #6
            Re: multiple languages in one document

            On Sat, 19 Mar 2005, Henri Sivonen wrote:
            [color=blue]
            > "enrique" <enrique.pineda @gmail.com> wrote:
            >[color=green]
            > > My question is about supporting two or more encodings in a single
            > > document.[/color]
            >
            > Not supported.[/color]

            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.

            Comment

            • Lachlan Hunt

              #7
              Re: multiple languages in one document

              enrique wrote:[color=blue]
              > Yes, I am aware of Unicode.[/color]

              Is there a reason why unicode is not appropriate for your needs?
              [color=blue]
              > My question is about supporting two or more encodings in a single
              > document.[/color]

              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.
              [color=blue]
              > 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.).[/color]

              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.



              --
              Lachlan Hunt

              http://GetFirefox.com/ Rediscover the Web
              http://GetThunderbird.com/ Reclaim your Inbox

              Comment

              • Jukka K. Korpela

                #8
                Re: multiple languages in one document

                "Alan J. Flavell" <flavell@ph.gla .ac.uk> wrote:
                [color=blue]
                > 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.[/color]

                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

                Comment

                • Ståle Sæbøe

                  #9
                  Re: multiple languages in one document

                  enrique wrote:[color=blue]
                  > 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
                  >[/color]
                  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.

                  Comment

                  • Jukka K. Korpela

                    #10
                    Re: multiple languages in one document

                    Ståle Sæbøe <othmaar@tdz.no > wrote:
                    [color=blue]
                    > 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.[/color]

                    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).
                    [color=blue]
                    > I believe it is possible to present multiple encodings on a single
                    > page,[/color]

                    It isn't, as explained before in this thread.
                    [color=blue]
                    > but it will be a bit tricky and involve embedding objects
                    > into it.[/color]

                    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

                    Comment

                    • Ståle Sæbøe

                      #11
                      Re: multiple languages in one document

                      Jukka K. Korpela wrote:[color=blue]
                      > Ståle Sæbøe <othmaar@tdz.no > wrote:
                      >
                      >[color=green]
                      >>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.[/color]
                      >
                      >
                      > The lang attribute has absolutely nothing to do with character
                      > encoding, which is what was discussed here.[/color]
                      How nice of you to point that out. Still not exactly off topic in my
                      opinion.
                      [color=blue]
                      > 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).[/color]
                      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.
                      [color=blue]
                      > 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.[/color]
                      Alright alright, geeze. I was just exploring the possibility. What is
                      with the attitude on these groups?

                      Comment

                      • Jukka K. Korpela

                        #12
                        Re: multiple languages in one document

                        Ståle Sæbøe <othmaar@tdz.no > wrote:
                        [color=blue]
                        > Alright alright, geeze. I was just exploring the possibility.[/color]

                        Explored how? What you posted here was not any exploration. It was a
                        suggestion to use a non-solution to a non-problem.
                        [color=blue]
                        > What is with the attitude on these groups?[/color]

                        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

                        Comment

                        Working...