{"id":30310254,"url":"https://github.com/dinoscapeprogramming/express-translify","last_synced_at":"2025-08-17T14:10:00.266Z","repository":{"id":305014980,"uuid":"1021641041","full_name":"DinoscapeProgramming/Express-Translify","owner":"DinoscapeProgramming","description":"A drop-in translation module for real-world Express applications","archived":false,"fork":false,"pushed_at":"2025-08-12T08:24:26.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-12T10:15:34.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/DinoscapeProgramming.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T17:54:25.000Z","updated_at":"2025-08-12T08:24:29.000Z","dependencies_parsed_at":"2025-07-17T23:31:20.246Z","dependency_job_id":"84ea993f-9af7-4379-b54c-38c127887ec4","html_url":"https://github.com/DinoscapeProgramming/Express-Translify","commit_stats":null,"previous_names":["dinoscapeprogramming/express-translify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DinoscapeProgramming/Express-Translify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FExpress-Translify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FExpress-Translify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FExpress-Translify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FExpress-Translify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DinoscapeProgramming","download_url":"https://codeload.github.com/DinoscapeProgramming/Express-Translify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DinoscapeProgramming%2FExpress-Translify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270856775,"owners_count":24657700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"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":"2025-08-17T14:09:59.654Z","updated_at":"2025-08-17T14:10:00.245Z","avatar_url":"https://github.com/DinoscapeProgramming.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Express Translify 🚀\r\n\r\nA drop-in translation module for real-world Express applications 🌍\r\n\r\n* 🪄 **Drop-in** *(no refactoring needed)*\r\n* 🪶 **Lightweight** *(\u003c 19 KB)*\r\n* ⚡ **Fast** *(smart client-side caching)*\r\n\r\n---\r\n\r\n## 1. 📦 Installation\r\n\r\n```sh\r\n$ npm install express-translify\r\n```\r\n\r\n## 2. 🌐 Specify Your Languages \u0026 Terms to Translate\r\n\r\n* 📝 Head into your `package.json`\r\n* ➕ Add your Translify options:\r\n\r\n```js\r\n{\r\n  // ...\r\n\r\n  \"translify\": {\r\n    \"default\": \"en\", // default value is \"en\"\r\n    \"languages\": [\r\n      \"de\",     // 🇩🇪\r\n      \"es\",     // 🇪🇸\r\n      \"zh\",     // 🇨🇳\r\n      // ...\r\n    ],\r\n    \"terms\": [\r\n      \"Welcome!\",\r\n      \"Lorem ipsum...\",\r\n      // ...\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n✨ Or, if you prefer, you can simply provide a path to an external config file like `\"translify.json\"` to keep things neat and separate:\r\n\r\n```json\r\n{\r\n  \"translify\": \"translify.json\"\r\n}\r\n```\r\n\r\nThis way, you get all the flexibility without cluttering your `package.json`! 🎉\r\n\r\n### ✍️ Placeholders in Terms\r\n\r\nUse `[...]` to mark dynamic parts in your terms:\r\n\r\n```json\r\n\"terms\": [\r\n  \"Hello, [...]!\",\r\n  \"You have [...] new messages\"\r\n]\r\n```\r\n\r\n\u003e `[...]` means \"leave this part out\" - it won't be translated.\r\n\r\n## 3. 🛠️ Generate Your Locales\r\n\r\n```sh\r\n$ npx translate\r\n```\r\n\r\nNeed a custom output path? Use the `--out` option 🛣️:\r\n\r\n```sh\r\n$ npx translate --out custom-path\r\n```\r\n\r\n## 4. 🧩 Use Our Express Middleware\r\n\r\n```js\r\nconst translify = require(\"express-translify\");\r\n\r\napp.use(translify());\r\n```\r\n\r\nUsing a custom locales path? Pass it in with the `path` option 🗂️:\r\n\r\n```js\r\napp.use(translify({ path: \"custom-path\" }));\r\n```\r\n\r\n## 5. 📥 Import Translify Into Your Website\r\n\r\n```html\r\n\u003c!-- Our middleware automatically serves all necessary assets --\u003e\r\n\u003cscript src=\"/translify.js\"\u003e\u003c/script\u003e\r\n```\r\n\r\n\u003e **Note:** If a term matches the page title, `document.title` is translated too.\r\n\r\n## 6. 🧭 Switching Languages at Runtime\r\n\r\n```js\r\ntranslify(\"de\"); // 🇩🇪 Switches to German\r\n```\r\n\r\n## 7. 🎉 Enjoy Translations in Your App\r\n\r\nThat's it! Your Express app now speaks multiple languages - no refactoring, no stress. 🌍✨","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinoscapeprogramming%2Fexpress-translify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinoscapeprogramming%2Fexpress-translify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinoscapeprogramming%2Fexpress-translify/lists"}