{"id":19774406,"url":"https://github.com/zbinlin/koa-fluent","last_synced_at":"2026-06-08T01:31:26.033Z","repository":{"id":34915857,"uuid":"189635468","full_name":"zbinlin/koa-fluent","owner":"zbinlin","description":"Fluent middleware for koa","archived":false,"fork":false,"pushed_at":"2023-01-07T06:00:58.000Z","size":1081,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-16T09:50:00.885Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zbinlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-31T17:45:42.000Z","updated_at":"2020-07-19T13:50:52.000Z","dependencies_parsed_at":"2023-01-15T10:20:47.617Z","dependency_job_id":null,"html_url":"https://github.com/zbinlin/koa-fluent","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zbinlin/koa-fluent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbinlin%2Fkoa-fluent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbinlin%2Fkoa-fluent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbinlin%2Fkoa-fluent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbinlin%2Fkoa-fluent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zbinlin","download_url":"https://codeload.github.com/zbinlin/koa-fluent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbinlin%2Fkoa-fluent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34044919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"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-12T05:12:52.027Z","updated_at":"2026-06-08T01:31:26.016Z","avatar_url":"https://github.com/zbinlin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koa-fluent\n\nFluent middleware for koa\n\n\n## Install\n\n```shell\nnpm install koa-fluent\n```\n\n\n## Usage\n\n```javascript\nimport * as Koa from \"koa\";\nimport fluent from \"koa-fluent\";\n\nconst app = new Koa();\n\n/**\n *\n * Adds `ftl` function to app.context\n * dirs list tree\n * ./locales\n * ├── en-US.ftl\n * ├── jp.ftl\n * └── zh-CN.ftl\n */\nfluent(app, {\n    dirs: \"./locales\", // locales dir\n    defaultLanguage: \"en-US\", // optional\n    functionName: \"ftl\", // optional\n    queryField: \"ftl_locale\", // optional\n    cookieField: \"ftl_locale\", // optional\n});\n\n/**\n * Use ctx.ftl to format message\n */\napp.use(async (ctx, next) =\u003e {\n    ctx.body = ctx.ftl(\"welcome\", {\n        name: \"colin\",\n    });\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbinlin%2Fkoa-fluent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzbinlin%2Fkoa-fluent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbinlin%2Fkoa-fluent/lists"}