01440: Support for new directive bodylang to set lang attribute in html body tag

Summary: Support for new directive bodylang to set lang attribute in html body tag
Created: 2019-05-10 02:15
Status: Open
Category: Feature
From: Jyoti
Assigned:
Priority: 4
Version: 2.2.114
OS: Linux/Apache/PHP7.3

Description: SEO recommendation is increasingly emphasizing on the presence of lang tag in html elements. I think providing an easy way to specify lang tag for the body element can be very useful.

This is an enhancement request not a bug report. Jyoti May 10, 2019, at 02:15 AM

You can easily specify the lang attribute for the <html> element, for compatible skins, with such a line in config.php or any other or group or page configuration: $HTMLTagAttr = ' lang="en"'; The skin template needs to have that variable in the <html> tag, like <html $HTMLTagAttr>. BTW it is also possible to place this variable in the <body> tag of the skin template, or create another (custom) variable. --Petko May 10, 2019, at 06:09 AM

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_COOKIE] => imstime=1777527562; PHPSESSID=64up7eb4vlbh61iiv447s1rgf5
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=PITS%2f01440
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=PITS%2f01440
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/01440
            [REDIRECT_SCRIPT_URL] => /wiki/PITS/01440
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afLrPY32BSzl8mX-jx8k5wAAAIg
            [REDIRECT_URL] => /wiki/PITS/01440
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 18500
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/PITS/01440
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/01440
            [SCRIPT_URL] => /wiki/PITS/01440
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afLrPY32BSzl8mX-jx8k5wAAAIg
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777527613.507
            [REQUEST_TIME] => 1777527613
            [argv] => Array
                (
                    [0] => n=PITS%2f01440
                )

            [argc] => 1
        )

)