{"id":20278840,"url":"https://github.com/madladsquad/untitledi18n","last_synced_at":"2025-04-11T06:13:19.814Z","repository":{"id":191893994,"uuid":"625987367","full_name":"MadLadSquad/UntitledI18N","owner":"MadLadSquad","description":"A powerful internationalisation(i18n) library","archived":false,"fork":false,"pushed_at":"2025-03-13T23:58:10.000Z","size":138,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T06:13:12.240Z","etag":null,"topics":["c","cpp","i18n","utility-library"],"latest_commit_sha":null,"homepage":"https://madladsquad.com/","language":"C++","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/MadLadSquad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yaml","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},"funding":{"ko_fi":"madladsquad"}},"created_at":"2023-04-10T14:56:03.000Z","updated_at":"2025-03-13T23:58:14.000Z","dependencies_parsed_at":"2023-10-22T14:26:27.870Z","dependency_job_id":"97d114f7-34cb-4ef5-9853-3efe1ddeb122","html_url":"https://github.com/MadLadSquad/UntitledI18N","commit_stats":null,"previous_names":["madladsquad/untitledi18n"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadLadSquad%2FUntitledI18N","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadLadSquad%2FUntitledI18N/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadLadSquad%2FUntitledI18N/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadLadSquad%2FUntitledI18N/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MadLadSquad","download_url":"https://codeload.github.com/MadLadSquad/UntitledI18N/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351394,"owners_count":21089270,"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":["c","cpp","i18n","utility-library"],"created_at":"2024-11-14T13:26:29.880Z","updated_at":"2025-04-11T06:13:19.789Z","avatar_url":"https://github.com/MadLadSquad.png","language":"C++","funding_links":["https://ko-fi.com/madladsquad"],"categories":[],"sub_categories":[],"readme":"# UntitledI18N\n[![CI](https://github.com/MadLadSquad/UntitledI18N/actions/workflows/CI.yaml/badge.svg)](https://github.com/MadLadSquad/UntitledI18N/actions/workflows/CI.yaml)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n[![trello](https://img.shields.io/badge/Trello-UDE-blue])](https://trello.com/b/HmfuRY2K/untitleddesktop)\n[![Discord](https://img.shields.io/discord/717037253292982315.svg?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/4wgH8ZE)\n\nA library providing a wide variety of [i18n](https://en.wikipedia.org/wiki/Internationalization_and_localization)\nabstractions and interfaces to query system and user language and locale settings.\n\nFeatures:\n- [x] Full C and C++ API for all features and abstractions\n- [x] Translation API\n    - [x] Static string interpolation\n    - [x] Interpolation using positional arguments\n    - [x] Dynamic string interpolation\n    - [x] Conditional string interpolation\n\n\n## The custom translation format\nOne of the distinctive features of the library is the custom translation file format. It's a YAML-based format that \nallows for most features, that translators and developers, need.\n\nWhile many would choose a system like [GNU gettext](https://www.gnu.org/software/gettext/), we think that it's somewhat\nlimited. Additionally, GNU's LGPL licensing and the availability of only 1 cross-platform implementation, made us\nrethink choosing gettext. Other implementations do exist, namely \n[NetBSD's libintl implementation](https://github.com/NetBSD/src/tree/trunk/lib/libintl), however, we saw that\nit would be too time-consuming for us to port this to Linux and Windows.\n\nThe benefits of our system are detailed below.\n\n### YAML is standard\nThere are many benefits for using a standard file format like YAML or JSON. One of them is that, if we decided to write \nfuture applications in another programming language, we don't have to worry about rewriting the whole text format\nparsing library. Additionally, YAML is highly readable and can be learned in about 10 minutes.\n\n### Message IDs are actual IDs\nLike gettext, we use string message IDs to get translations. Unlike gettext, these IDs are actual IDs. The IDs should\nbe written with a descriptive name like \"close-button\". Once placed in a translation template file, these IDs can be\ntranslated into any language, including \"en-US\". Using our predefined language codes, an application can further set the\ndefault language in case a fallback is needed.\n\nThis solves the following problems:\n1. Changing the source string in the file invalidates the whole translation ID, which breaks translations. We prefer \noutdated translations than having none at all\n1. Fixes the need to use or provide additional context variables since the IDs can already include that information - \ne.g. a button and status message may have the same ID in gettext, \"Open\". In other languages this will require \ncompletely different words, which in gettext, is solved by adding context. In our system one may define \n\"open-button-action\" and \"open-status-message\", which can easily be translated separately.\n\nThis may not seem like it makes much of a difference, but having these generic IDs allows us to follow the separation of\nconcerns principle and does not bother the developer with translation concerns and vice-versa.\n\n### Terms\nThe format also supports the ability for the user to define so-called \"terms\". These \"terms\" can be used for addresses,\nplace names and general branding without needing to be translated.\n\n### Variables, templating and interpolation\nThe format also supports the ability to use variables to template strings. Since every ID defines a variable, it's easy\nto chain translations when needed. Variables can also be pushed from code for purposes of string interpolation.\n\nThe format also allows for conditional templating, so that the translator can easily deal with genders, cases, plurals\nand other grammatical concepts.\n\n## Installation and Learning\nAll documentation, including install instructions, can be found on the \n[wiki](https://github.com/MadLadSquad/UntitledI18N/wiki).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadladsquad%2Funtitledi18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadladsquad%2Funtitledi18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadladsquad%2Funtitledi18n/lists"}