manifest lang / dir browser support
Published Updated
The Web App Manifest’s dir and lang members set a default text direction
and language for the manifest’s localizable members — name, short_name,
and icons.
Browser support
Section titled “Browser support”MDN’s manifest reference notes that, as implemented today, dir, lang, and
iarc_rating_id are not implemented by browsers. There is no per-browser
support table to cite for these two members, because no browser currently acts
on them.
How to use it
Section titled “How to use it”You can still declare dir and lang in your manifest — they are valid,
optional members per the spec:
{ "name": "SuperSausage", "dir": "rtl", "lang": "ar", "start_url": "."}How to detect it at runtime
Section titled “How to detect it at runtime”Per MDN, dir, lang, and iarc_rating_id are not implemented by browsers.
function applyDocumentLocale(lang, dir) { // The manifest's `dir`/`lang` members are not implemented by browsers. if (typeof document === 'undefined') { return; } document.documentElement.lang = lang; document.documentElement.dir = dir;}Practical checklist
Section titled “Practical checklist”- Do not rely on the manifest’s
dirorlangmembers for direction or language control — MDN states neither is implemented by any browser. - The manifest’s
dir/langmembers are separate from a document’s own<html dir>/<html lang>attributes; declaring one does not set the other. - Declaring
dir/langin the manifest is still spec-valid, even though MDN states neither is implemented by any browser today.
Where to go next
Section titled “Where to go next”← Back to the Compatibility explorer.