{"id":23053696,"url":"https://github.com/component/t","last_synced_at":"2025-08-15T04:31:01.550Z","repository":{"id":4641772,"uuid":"5786774","full_name":"component/t","owner":"component","description":"translation utility","archived":false,"fork":false,"pushed_at":"2014-03-17T14:45:29.000Z","size":209,"stargazers_count":16,"open_issues_count":2,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-09T16:58:38.830Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-12T22:23:39.000Z","updated_at":"2023-05-25T19:03:50.000Z","dependencies_parsed_at":"2022-08-29T19:50:38.117Z","dependency_job_id":null,"html_url":"https://github.com/component/t","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/component/t","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/t/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ft/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269803855,"owners_count":24477658,"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-10T02:00:08.965Z","response_time":71,"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-12-16T00:19:14.841Z","updated_at":"2025-08-15T04:31:01.256Z","avatar_url":"https://github.com/component.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# t\n\n  tiny translation helper.\n\n## Installation\n\n    $ component install component/t\n\n## API\n\n### t(string, [object], [lang])\n\n  Return a translatable `string`, with optional\n  substitutions keyed in `object` using language `lang`.\n\n```js\nvar t = require('t');\n\nt('Hello');\n// =\u003e \"Hello\"\n\nt('Hello {name}', { name: 'Tobi' });\n// =\u003e \"Hello Tobi\"\n```\n\n### t.lang()\n\n  Get the current language code, for example \"en\".\n\n### t.lang(code)\n\n  Set language `code`.\n\n### t.CODE = object\n\n  Define translations, for example:\n\n```js\nt.es = {\n  'Hello {name}': 'Hola {name}'\n};\n\nt('Hello {name}', { name: 'Tobi' });\n// =\u003e \"Hello Tobi\"\n\nt.lang('es');\nt('Hello {name}', { name: 'Tobi' }).should.equal('Hola Tobi');\n// =\u003e \"Hola Tobi\"\n```\n\n# License\n\n  MIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Ft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Ft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Ft/lists"}