All Collections
FAQ
Issues
Why does language detection specify the wrong language?
Why does language detection specify the wrong language?

Wrong Language and misspelled words due to other languages, and how to repair them

Updated over a week ago

Q. Why does automatic language detection specify the wrong language?

It can happen that the automatic language detection identifies a page as containing the wrong language. Sometimes a page can contain a snippet in another language, resulting in an Accessibility error (screen readers cannot identify language, and so it should be specified within the code).

Some steps to take are:

  1. Make sure that the scan is set up for the correct language:

    1. From the Monsido Domain Overview (Globe icon) click Admin Settings (the gear icon) at the top of the page. The Admin Settings page opens.

    2. On the same row as the domain to scan, click Action.

    3. In the drop-down list, select Edit Domain.

    4. In the Domain Details section, locate Language: Click the drop-down arrow and select the language for the domain scan. Select the primary language for the domain.

    Addtionally, in the Edit Domain --> Crawl (Scan) Options section, make sure that the Use Language Attribute switch is turned to ON.

    For more information, see the User Guide chapter:

  2. Another Language: Words on a page that are written in another language are usually tagged as misspelled words. For instructions on how to repair the HTML code for this Accessibility error, see the HTML School site (external link).

  3. Language Detected: Click a page URL and scroll to the bottom of the Dashboard to the Crawl Information section. Check that the language detected is correct.


Another solution is to turn ON the Use Language Attribute option in domain setup.

  1. From the Monsido Domain Overview (Globe icon) click Admin Settings (the gear icon) at the top of the page. The Admin Settings page opens.

  2. Note: The Settings button is only available to site admins.

    Image that shows the location of the Settings button.

  3. On the same row as the domain to scan, click Action.

    Image showing the location of the Actions button for a domain.

  4. In the drop-down list, select Edit Domain.

  5. The Edit Domain pane slides open.

In the Crawl Options section:

Image of the Edit Domain pane, showing the Crawl (Scan) Options section.
  • Use language attribute: Toggle the switch OFF or ON. When this feature is enabled, the scan does not try to auto-detect the page language. This means that spell checking is only done for the language specified in the lang attribute.

    The Use Lang Attribute feature allows for the correct spell checking of multiple language HTML pages.

    NOTE: The primary language of the HTML page must be correctly defined as a lang attribute on the <html> tag. Additionally, each subsection of the page that is in any other language must be wrapped in a tag with a proper lang attribute value.


    See below for an example:

    <html lang=en">
    <head>
    <title>Hello World in other languages</title>
    </head>
    <body>
    <h1>Hello World in other languages</h1>
    <p>
    Spanish: <span lang="es">Hola Mundo</span><br>
    Danish: <span lang="da">Hej verden</span><br>
    French: <span lang="fr">Bonjour le monde</span>
    </p>
    </body>
    </html>

Remember: When enabled, the scan does not auto-detect the page language. For example, spell checks are always for the language specified in the lang attribute.

Did this answer your question?