Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Oct 2009
    Posts
    478
    Thanks
    7
    Thanked 3 Times in 3 Posts

    How do I 'Declare Language' for my page ?

    According to woorank.com my page shows the following.


    Language
    Declared: Missing
    Detected: en

    I have used
    Code:
    header('content-type: text/html; charset=utf-8');
    but do not know how I declare the language.

    how is this done ?

    also how do i specify Language/character encoding
    Last edited by needsomehelp; 11-22-2011 at 10:05 AM.

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Regular Coder
    Join Date
    Oct 2009
    Posts
    478
    Thanks
    7
    Thanked 3 Times in 3 Posts
    ok thanks.

    when I validate the page using w3.org I get the following error.

    No Character encoding declared at document level

    I thought using
    Code:
    header('content-type: text/html; charset=utf-8');
    set the encoding, if not what does ?

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    That looks like a PHP method to me ... What prevents you from using a classical META tag to define the charset?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    Regular Coder
    Join Date
    Oct 2009
    Posts
    478
    Thanks
    7
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by Kor View Post
    That looks like a PHP method to me ... What prevents you from using a classical META tag to define the charset?
    HMTL5 validation !

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,930
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    Quote Originally Posted by needsomehelp View Post
    HMTL5 validation !
    Nonsense. http://nimbupani.com/declaring-languages-in-html-5.html

  • #7
    Regular Coder
    Join Date
    Oct 2009
    Posts
    478
    Thanks
    7
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by VIPStephan View Post
    ok I trust that you must be right, but... this is the error I get in w3.org validator...
    Code:
    Line 54, Column 35: Bad value language for attribute name on element meta: Keyword language is not registered.
    
    <meta name="language" content="en">

  • #8
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Because the correct syntax is:
    Code:
    <meta http-equiv="content-language" content="en">
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •