SitePoint Sponsor |
|
User Tag List
Results 1 to 10 of 10
Thread: Must I insert langusge tags?
-
Dec 15, 2008, 14:03 #1
- Join Date
- Jun 2008
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Must I insert langusge tags?
I have 2 landing pages in Russian and Hebrew in the blog that is totally in English.
Should I insert some language tags in to the HTML page?
If yes, what tags and where?
Thanks,
Vadim
-
Dec 15, 2008, 14:30 #2
- Join Date
- Nov 2005
- Location
- Norway
- Posts
- 715
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I usually use the html lang attribute.
Code:<html lang="en">
-
Dec 15, 2008, 15:08 #3
- Join Date
- Jun 2008
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My page starts like this:
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>שירות, תיקונים ותחזוקת מחשבים בתל אביב, ישראל</title>
Should I insert it into the first line like that:
<html lang="he" xmlns="http://www.w3.org/1999/xhtml">
The page is here:
http://repairpcguide.com/pc-repair-service/he/
Thanks,
Vadim
-
Dec 15, 2008, 15:14 #4
- Join Date
- Nov 2005
- Location
- Norway
- Posts
- 715
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yep correct. If the whole page is in Hebrew, otherwise you can use the lang attribute on other elements as well.
More info: http://www.w3.org/TR/REC-html40/struct/dirlang.html
-
Dec 15, 2008, 23:23 #5
- Join Date
- May 2006
- Location
- Aurora, Illinois
- Posts
- 15,476
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
In your case, you should use both the lang and xmllang attributes in your HTML opening tag along with the META content language tag.
HTML Code:<html xmlns="http://www.w3.org/1999/xhtml" lang="iw" xml:lang="iw">
HTML Code:<meta http-equiv="content-language" content="iw" />
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
-
Dec 16, 2008, 01:50 #6
- Join Date
- Jun 2008
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Dan thanks a lot, it was of great help!
But isn't "IW" obsolete?
Nowadays Hebrew language use "HE" attribute, isn't it?
For the sections of the page that have English (like your search form), add the lang="en" attribute. I also recommend you remove the Wordpress generator tag from your header.php file as well - you don't want scripts sniffing to see what version of WordPress you're using and then hacking into it.
<a lang="en" href="/contact-us/" target="_blank">או שלח אי-מייל </a>
Thanks again
Vadim
-
Dec 16, 2008, 02:02 #7
- Join Date
- May 2006
- Location
- Aurora, Illinois
- Posts
- 15,476
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The SitePoint Reference has IW as the current listing. If HE is now being used, then by all means go ahead and use it.
The attribute would be put in the the tag that has the English content on it.Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
-
Dec 16, 2008, 03:44 #8
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
According to ISO 639-2 the language code for Hebrew is 'heb' (or 'he' in ISO 639-1).
Birnam wood is come to Dunsinane
-
Dec 16, 2008, 03:52 #9
- Join Date
- May 2006
- Location
- Aurora, Illinois
- Posts
- 15,476
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That settles it then. Time to update the SitePoint Reference...
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
-
Dec 18, 2008, 06:41 #10
- Join Date
- Jun 2008
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks guys!
Can you check the source code and see whether or not I should remove or change something?
Thank you very much
Vadim
Bookmarks