{"id":19142280,"url":"https://github.com/eldoy/reqlang","last_synced_at":"2026-01-18T10:02:41.236Z","repository":{"id":57688858,"uuid":"483461480","full_name":"eldoy/reqlang","owner":"eldoy","description":"NodeJS HTTP server request language","archived":false,"fork":false,"pushed_at":"2024-08-01T01:24:15.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-26T20:52:27.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eldoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-20T01:09:35.000Z","updated_at":"2024-08-01T01:24:19.000Z","dependencies_parsed_at":"2024-11-09T07:39:45.396Z","dependency_job_id":null,"html_url":"https://github.com/eldoy/reqlang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eldoy/reqlang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Freqlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Freqlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Freqlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Freqlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldoy","download_url":"https://codeload.github.com/eldoy/reqlang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Freqlang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T07:26:38.123Z","updated_at":"2026-01-18T10:02:41.221Z","avatar_url":"https://github.com/eldoy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reqlang\n\nSet the language for NodeJS web servers.\n\n### Install\n\n```\nnpm i reqlang\n```\n\n### Usage\n\nThe language of the request is looked up in this order:\n\n1. Params lang\n2. From pathname: `/en/hello`\n3. From the lang cookie\n4. The default language\n5. Fallback to English (`en`)\n\n```js\nvar http = require('http')\nvar rekvest = require('rekvest')\nvar wcookie = require('wcookie')\nvar lang = require('reqlang')\n\n// NodeJS web server\nvar server = http.createServer(function(req, res) {\n\n  // Add pathname to request object\n  rekvest(req)\n\n  // Add cookie support\n  wcookie(req)\n\n  // Set the request language\n  lang(req)\n\n  // Set the request language, with default\n  lang(req, 'en')\n\n  req.lang // 'en'\n})\n```\n\nISC Licensed. Enjoy!\n\nCreated by [Eldøy Projects](https://eldoy.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Freqlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldoy%2Freqlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Freqlang/lists"}