{"id":19598264,"url":"https://github.com/dotupnet/dotup-ts-internationalization","last_synced_at":"2025-06-12T07:32:51.436Z","repository":{"id":34242868,"uuid":"173137411","full_name":"dotupNET/dotup-ts-internationalization","owner":"dotupNET","description":"Library for typed translation and internationalization","archived":false,"fork":false,"pushed_at":"2022-12-03T00:21:55.000Z","size":494,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T12:19:03.010Z","etag":null,"topics":["cldr","i18n","intl","numberformat","plural-rules","pluralization","translation","typed","typescript"],"latest_commit_sha":null,"homepage":"","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/dotupNET.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-02-28T15:30:27.000Z","updated_at":"2020-08-17T16:23:48.000Z","dependencies_parsed_at":"2023-01-15T05:35:17.539Z","dependency_job_id":null,"html_url":"https://github.com/dotupNET/dotup-ts-internationalization","commit_stats":null,"previous_names":["dotupnet/dotup-ts-textmanager"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dotupNET/dotup-ts-internationalization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotupNET%2Fdotup-ts-internationalization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotupNET%2Fdotup-ts-internationalization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotupNET%2Fdotup-ts-internationalization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotupNET%2Fdotup-ts-internationalization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotupNET","download_url":"https://codeload.github.com/dotupNET/dotup-ts-internationalization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotupNET%2Fdotup-ts-internationalization/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259420607,"owners_count":22854618,"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","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":["cldr","i18n","intl","numberformat","plural-rules","pluralization","translation","typed","typescript"],"created_at":"2024-11-11T09:05:35.777Z","updated_at":"2025-06-12T07:32:51.398Z","avatar_url":"https://github.com/dotupNET.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/dotupNET/dotup-ts-internationalization.svg?branch=skill-template)](https://travis-ci.org/dotupNET/dotup-ts-internationalization)\n\n# dotup-ts-internationalization\nLibrary for typed translation and internationalization\n\n## USAGE\n\n```typescript\n\nenum TextKeys {\n  'Hello' = 'Hello', 'WithTextLink' = 'WithTextLink', 'Slang' = 'Slang',\n  PluralizedWithGender = 'PluralizedWithGender',\n  DirectText = 'DirectText',\n  Pluralized = 'Pluralized',\n  TextArray = 'TextArray',\n  PlaceHolderText = 'PlaceHolderText',\n  Gendered = 'Gendered',\n  NamedPlaceHolderText = 'NamedPlaceHolderText'\n}\n\nconst translations: Translations\u003cTextKeys\u003e = {\n  'de-DE': {\n    PlaceHolderText: 'Text with {0}',\n    NamedPlaceHolderText: 'Text two with {MyVariable}',\n    DirectText: 'DirectText',\n    TextArray: ['TextArray1', 'TextArray2'],\n    WithTextLink: ['$(DirectText) with $(Slang)'],\n    Gendered: {\n      male: 'is male',\n      female: 'is female'\n    },\n    Pluralized: {\n      plural: {\n        zero: 'zero',\n        one: 'one',\n        few: 'few',\n        many: 'many',\n        other: 'other',\n        two: 'two'\n      }\n    },\n    PluralizedWithGender: {\n\n      plural: {\n        few: {\n          female: [''],\n          male: 'he has #'\n        },\n        one: {\n          female: ['plural-one-female # $(DirectText)'],\n          male: 'plural-one-male $(DirectText)'\n        },\n        other: 'plural-other $(DirectText)',\n        many: ''\n      },\n      ordinal: {\n        one: ['erstes $(Hello)'],\n        other: 'zweites $(Hello)'\n      }\n    },\n    Hello: ['Hallo', 'Hi', 'Servus'],\n    Slang: ['nasen', 'eumel', 'vögel']\n  }\n};\n\n// Initialize required languages\nInitializeIntl(LanguageEnum.deDE, LanguageEnum.enGB);\n\n// Initialize text library with text\nconst tlib = new TextLibrary(translations);\n// Get a translator for a specific language\nconst t = tlib.getTranslator(LanguageEnum.deDE);\n\n// Translate\nconst result = t.format({\n  key: TextKeys.PluralizedWithGender,\n  gender: GenderGroups.male,\n  plural: {\n    group: PluralGroups.plural,\n    value: 1\n  }\n});\nconsole.log(`format 1: ${result}`);\n\n```\n\n\n## Docs:\nhttps://dotupnet.github.io/dotup-ts-internationalization/index.html\n\n## repository:\nhttps://github.com/dotupNET/dotup-ts-internationalization/tree/skill-template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotupnet%2Fdotup-ts-internationalization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotupnet%2Fdotup-ts-internationalization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotupnet%2Fdotup-ts-internationalization/lists"}