Forum Moderators: open

Message Too Old, No Replies

HTML header code for multi lingual page?

         

born2run

12:21 pm on Jan 6, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi I had the following html code for a page when it had only English text:

<html lang="en">

Now, it has two languages content in it, so what html code should I use for this multilingual page? Should I just remove the code above?

Thanks in advance!

coothead

4:01 pm on Jan 6, 2022 (gmt 0)

5+ Year Member Top Contributors Of The Month



Hi there born2run.

assuming that ...

<html lang="en"> 

...is the main language,simply add the lang attribute
to those elements that contain a different language, for
example...

<div class="french-information" lang="fr">sacré bleu</div>


Further reading:-

Declaring language in HTML [w3.org]

coothead

Jonesy

5:49 pm on Jan 8, 2022 (gmt 0)

10+ Year Member Top Contributors Of The Month



I've done it paragraph by paragraph:
<p lang="fr"> ...... </p>

coothead

6:02 pm on Jan 8, 2022 (gmt 0)

5+ Year Member Top Contributors Of The Month



Hi there Jonesy,

correct me if I am wrong, but are you not just repeating
a little of the information that I have already posted? :(

coothead