• Resolved Paul

    (@paulschiretz)


    The new Advanced option to change html lang attribute to a region independent form conflicts with the output you added to the footer (add_tp_language_lang_attribute), if i choose the region independent form the lang tag in the footer still has the region attached to it the one in the html element gets stripped.

    Your very last checkin broke it: svn #2749599, the function that is called is the following:

        /**
         * @param $output
         * @return $output
         *
         * adds a new attribute in footer, tp_language_lang, for Automatic User Language Detection to rely on for finding the current language
         */
        public function add_tp_language_lang_attribute(){
            global $TRP_LANGUAGE;
            $html ='<template id="tp-language" lang="'. esc_attr($TRP_LANGUAGE) . '"></template>';
            echo $html; /* phpcs:ignore *///ignored because the html is constructed by us
        }

    This function also needs to strip the region from it, otherwise we confuse everyone with two different lang tags.

    Can you please fix that and release a quickfix, i downgraded for now….

    Thanks a lot,
    Paul

Viewing 3 replies - 1 through 3 (of 3 total)
  • Dragos

    (@dragosvrejiu)

    Hello Paul,

    Thank you for getting in touch with us!

    I’ve sent this issue to our development team. We will get back to you once the fix is implemented.

    Best regards,

    Dragos

    (@dragosvrejiu)

    Hello @paulschiretz,

    That template tag is used by TranslatePress to identify the language of the html in certain conditions. It was not meant to be read by visitors nor search engines. It’s just an empty tag that’s never displayed.

    But you raise a valid point because ‘lang’ is a reserved keyword. We can use a different attribute name just in case search engines might believe at some point that there is text in a different language when the region independent option is chosen. We’ll change the attribute name to something else in the next update. The value of the attribute will stay the same.

    Best regards,

    Thread Starter Paul

    (@paulschiretz)

    Hi @dragosvrejiu
    Great, that’s also a solution, didn’t think of that.

    Thanks a lot! Looking forward to the next version.

    All the best,
    Paul

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New Function to change html lang attribute to a region independent breaks html’ is closed to new replies.