{"library":"connect-locale","type":"library","category":null,"description":"connect-locale is a configurable Express/Connect middleware designed specifically for detecting and storing user locale preferences within web applications. It is not a comprehensive i18n solution for managing resource files, but rather focuses on establishing a flexible strategy for locale identification and persistence. The library allows developers to define a sequence of strategies (e.g., path, cookie, accept-language header) to determine the user's preferred locale and then store it in various locations (e.g., cookie, session, request object, `res.locals`) for subsequent use in other middleware or templating engines. The current stable version is 1.3.3. Given its last update several years ago, it is in maintenance mode, providing a stable, albeit not actively developed, solution for locale detection. Its key differentiators are its highly configurable detection and storage mechanisms, allowing for custom i18n strategies.","language":"javascript","status":"maintenance","version":"1.3.3","tags":["javascript","locale","express","connect","locale-detection","i18n","i18n-locale"],"last_verified":"Wed May 27","install":[{"cmd":"npm install connect-locale","imports":["const Locale = require('connect-locale');","const Locale = require('connect-locale');\napp.use(Locale(options));","app.use(Locale({\n  locales: ['en', 'de'],\n  getLocaleFrom: ['path', 'cookie', 'accept-language']\n}));"]},{"cmd":"yarn add connect-locale","imports":[]},{"cmd":"pnpm add connect-locale","imports":[]}],"homepage":null,"github":"https://github.com/intesso/connect-locale","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/connect-locale","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/connect-locale/compatibility"}}