{"id":29408214,"url":"https://github.com/codelits/langie-api-sdk","last_synced_at":"2026-05-10T05:02:13.836Z","repository":{"id":301199604,"uuid":"1008473223","full_name":"CodeLits/langie-api-sdk","owner":"CodeLits","description":"A lightweight, flexible translation SDK for Vue.js applications that provides seamless multilingual support with minimal configuration. Built with TypeScript and Vue 3 Composition API.","archived":false,"fork":false,"pushed_at":"2025-07-27T13:45:33.000Z","size":1001,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T13:46:17.440Z","etag":null,"topics":["free-tier","i18n","internationalization","localization","nuxt","rest-api","translation","translation-api","vue"],"latest_commit_sha":null,"homepage":"https://api.langie.uk/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeLits.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","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-06-25T15:41:57.000Z","updated_at":"2025-07-27T13:43:35.000Z","dependencies_parsed_at":"2025-06-25T17:31:40.611Z","dependency_job_id":"d89fb8f6-5c1b-4e03-8194-7d5d7924ec4f","html_url":"https://github.com/CodeLits/langie-api-sdk","commit_stats":null,"previous_names":["vivaprogress/langie-api-sdk","codelits/langie-api-sdk"],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/CodeLits/langie-api-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLits%2Flangie-api-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLits%2Flangie-api-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLits%2Flangie-api-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLits%2Flangie-api-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeLits","download_url":"https://codeload.github.com/CodeLits/langie-api-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLits%2Flangie-api-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271790617,"owners_count":24821632,"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-24T02:00:11.135Z","response_time":111,"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":["free-tier","i18n","internationalization","localization","nuxt","rest-api","translation","translation-api","vue"],"created_at":"2025-07-11T02:25:03.443Z","updated_at":"2026-05-10T05:02:13.746Z","avatar_url":"https://github.com/CodeLits.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Langie API SDK\n\n[![npm version](https://img.shields.io/npm/v/langie-api-sdk.svg?style=flat)](https://www.npmjs.com/package/langie-api-sdk)\n[![Apache 2.0 License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n\nLightweight translation SDK for Vue.js, Nuxt.js, and vanilla JavaScript applications with smart interface language selection and limit monitoring.\n\n## 🚀 [Live Demo](https://langie-demo.netlify.app/)\n\n## Requirements\n\n- Node.js 18.0.0 or higher\n- Vue 3.2.0 or higher\n- Nuxt 3.0.0 or higher (optional)\n- Modern browser with ES2020+ support\n\n## Installation\n\n```bash\nnpm install langie-api-sdk\n```\n\n### Dependencies\n\nThe SDK uses the following external libraries:\n\n- `countries-and-timezones` - For accurate timezone to country mapping (316KB, MIT license)\n- `@vueform/multiselect` - For the language selection dropdown component\n\n## Quick Start\n\n### Basic Usage\n\n```vue\n\u003cscript setup\u003e\nimport { useLangie } from 'langie-api-sdk'\nimport { lt } from 'langie-api-sdk/components'\n\nconst { lr, setLanguage } = useLangie()\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003ch1\u003e{{ lr('Welcome to our application') }}\u003c/h1\u003e\n  \u003clt\u003eHello world!\u003c/lt\u003e\n  \u003cbutton @click=\"setLanguage('es')\"\u003eSwitch to Spanish\u003c/button\u003e\n\u003c/template\u003e\n```\n\n### Global Component Registration\n\nYou can register the `lt` component globally for easier usage throughout your application:\n\n```javascript\n// main.js\nimport { createApp } from 'vue'\nimport App from './App.vue'\nimport { lt } from 'langie-api-sdk/components'\n\nconst app = createApp(App)\n\n// Register lt component globally\napp.component('lt', lt)\n\napp.mount('#app')\n```\n\nThen use it directly in templates without importing:\n\n```vue\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003ch1\u003e\u003clt\u003eWelcome to our application!\u003c/lt\u003e\u003c/h1\u003e\n    \u003cp\u003e\u003clt\u003eThis text will be translated automatically.\u003c/lt\u003e\u003c/p\u003e\n    \u003cbutton\u003e\u003clt\u003eClick me\u003c/lt\u003e\u003c/button\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript setup\u003e\nimport { useLangie } from 'langie-api-sdk'\n\nconst { setLanguage } = useLangie()\n\u003c/script\u003e\n```\n\n## Documentation\n\n- **[Getting Started](./docs/getting-started.md)** - Installation and basic setup\n- **[Vue.js Usage](./docs/vue.md)** - Vue composables, components, and best practices\n- **[Components](./docs/components.md)** - Ready-to-use Vue components\n- **[Composables](./docs/composables.md)** - Vue composables and reactive state\n- **[Advanced Usage](./docs/advanced-usage.md)** - Complex patterns and optimization\n- **[TypeScript Support](./docs/typescript.md)** - TypeScript integration guide\n- **[Nuxt.js Integration](./docs/nuxt.md)** - SSR support, plugins, and deployment\n- **[JavaScript Usage](./docs/javascript.md)** - Vanilla JS, React, and Node.js integration\n- **[Core API](./docs/core-api.md)** - Core translation functions\n- **[Backend Integration](./docs/backend-integration.md)** - API requirements and setup\n- **[Contributing](./CONTRIBUTING.md)** - Development and contribution guidelines\n- **[Compatibility Guide](./COMPATIBILITY.md)** - Version requirements and compatibility\n\n## Required CSS\n\nFor `LanguageSelect` component:\n\n```js\n// main.js\nimport '@vueform/multiselect/themes/default.css'\nimport 'langie-api-sdk/dist/index.css'\n```\n\n## Advanced Usage\n\n### Global Translation Defaults\n\nYou can set global defaults for all translation functions and the `lt` component to avoid repeating common parameters:\n\n```javascript\n// main.js\nimport { createApp } from 'vue'\nimport App from './App.vue'\nimport { lt, setLtDefaults } from 'langie-api-sdk/components'\n\nconst app = createApp(App)\n\n// Register lt component globally\napp.component('lt', lt)\n\n// Set global defaults (optional)\nsetLtDefaults({\n  ctx: 'ui', // default context\n  orig: 'en' // optional original language (no default)\n})\n\napp.mount('#app')\n```\n\nNow you can use simplified syntax:\n\n```vue\n\u003ctemplate\u003e\n  \u003c!-- Uses global defaults: ctx=\"ui\" --\u003e\n  \u003clt\u003eCancel\u003c/lt\u003e\n\n  \u003c!-- Override specific props --\u003e\n  \u003clt ctx=\"content\"\u003eArticle title\u003c/lt\u003e\n  \u003clt orig=\"fr\"\u003eBonjour\u003c/lt\u003e\n\n  \u003c!-- Both overrides --\u003e\n  \u003clt ctx=\"content\" orig=\"es\"\u003eHola mundo\u003c/lt\u003e\n\u003c/template\u003e\n```\n\n```javascript\n// Functions also use global defaults\nconst { l, lr } = useLangie()\n\n// Uses global defaults: ctx=\"ui\"\nl('Hello world') // Not reactive, for JS only\nlr('Welcome message') // Reactive, for Vue templates/computed\n\n// Override specific parameters\nl('Article title', 'content') // Not reactive\nlr('French text', 'ui', 'fr') // Reactive\n```\n\n## Features\n\n- **Reactive translations** with automatic UI updates\n- **SSR support** for Nuxt.js applications\n- **Smart caching** with context-aware storage\n- **Language detection** with browser locale support\n- **Limit monitoring** with usage tracking\n- **TypeScript support** with full type definitions\n- **Multiple frameworks** - Vue.js, Nuxt.js, vanilla JavaScript\n\n## Backend Requirements\n\nYour translation service needs these endpoints:\n\n- `POST /translate` - Translate texts\n- `GET /languages` - Available languages\n- `GET /limit` - API usage limits\n- `GET /health` - Service health check\n\nSee [Backend Integration](./docs/backend-integration.md) for detailed API specifications and setup guide.\n\n## License\n\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelits%2Flangie-api-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelits%2Flangie-api-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelits%2Flangie-api-sdk/lists"}