Skip to content

DG011: Document has no language ​

Console warning
text
[datagrids DG011] <html lang> is missing; uppercase headers may render Turkish i wrong (TARIH).

Printed with console.warn, once per distinct message. configure({ warnings: false }) silences it.

When it happens ​

The page's <html> element has no lang attribute while the grid uses uppercase headers (the default head: "caps"). Uppercasing in CSS depends on the language: in Turkish i becomes İ, elsewhere I, so a header can come out wrong. Without lang, and without a locale option or configure({ locale }), the grid also takes the browser's language (English when that is unusable).

How to fix it ​

Declare the page language: <html lang="en">. Or switch to sentence-case headers with head: "sentence". Set locale when a grid's language differs from the page's.

Released under the MIT License.