{"library":"accept-language","type":"library","category":null,"description":"accept-language is a Node.js library designed to parse the HTTP Accept-Language header, enabling applications to determine the user's preferred language based on the browser's request. It adheres strictly to the BCP47 standard for language tag compliance, ensuring robust internationalization (i18n) support. The current stable version is 3.0.20, which was last updated over two years ago, indicating a mature and stable codebase with a slow release cadence focused on maintenance rather than frequent feature additions. A key differentiator of this library is its streamlined approach: it focuses on providing a single best-matched language tag from a pre-defined list, simplifying the process for common i18n use cases where a direct match is preferred over a ranked list of possibilities. This contrasts with other parsers that might return an array of parsed language objects or offer extensive, complex matching options.","language":"javascript","status":"maintenance","version":"3.0.20","tags":["javascript","accept-language","i18n","http","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install accept-language","imports":["import acceptLanguage from 'accept-language';","const acceptLanguage = require('accept-language');","acceptLanguage.languages(['en-US', 'zh-CN']);"]},{"cmd":"yarn add accept-language","imports":[]},{"cmd":"pnpm add accept-language","imports":[]}],"homepage":null,"github":"https://github.com/tinganho/node-accept-language","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/accept-language","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/accept-language/compatibility"}}