{"id":19559809,"url":"https://github.com/lepoco/i18n","last_synced_at":"2025-04-12T14:21:30.168Z","repository":{"id":36987477,"uuid":"449900326","full_name":"lepoco/i18n","owner":"lepoco","description":"Convenient localization of Windows applications with YAML files.","archived":false,"fork":false,"pushed_at":"2024-07-18T07:25:39.000Z","size":242,"stargazers_count":51,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T08:51:35.344Z","etag":null,"topics":["csharp","dotnet","i18n","internationalization","localization","netcore","translation","windows","wpf","yaml"],"latest_commit_sha":null,"homepage":"https://lepo.co","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/lepoco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["lepoco"]}},"created_at":"2022-01-20T00:28:00.000Z","updated_at":"2025-03-24T10:03:50.000Z","dependencies_parsed_at":"2024-12-23T18:45:38.148Z","dependency_job_id":null,"html_url":"https://github.com/lepoco/i18n","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepoco%2Fi18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepoco%2Fi18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepoco%2Fi18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lepoco%2Fi18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lepoco","download_url":"https://codeload.github.com/lepoco/i18n/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578874,"owners_count":21127714,"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":["csharp","dotnet","i18n","internationalization","localization","netcore","translation","windows","wpf","yaml"],"created_at":"2024-11-11T05:04:15.818Z","updated_at":"2025-04-12T14:21:30.124Z","avatar_url":"https://github.com/lepoco.png","language":"C#","funding_links":["https://github.com/sponsors/lepoco"],"categories":[],"sub_categories":[],"readme":"# 🏃 Lepo i18n\n\n[Created with ❤ in Poland by lepo.co](https://dev.lepo.co/)  \nLepo.i18n is an essential tool for developers aiming to create multilingual applications in WPF, WinForms, or CLI environments. By harnessing the capabilities of Dependency Injection (DI) and localization resources, Lepo.i18n facilitates better management of language resources, reducing complexity and enhancing the adaptability of your applications to different languages and cultures. With its support for JSON, WPF, and YAML formats, Lepo.i18n ensures seamless integration of localization into your project, making it a go-to solution for your internationalization needs.\n\n[![GitHub license](https://img.shields.io/github/license/lepoco/i18n)](https://github.com/lepoco/i18n/blob/master/LICENSE) [![Nuget](https://img.shields.io/nuget/v/Lepo.i18n)](https://www.nuget.org/packages/Lepo.i18n/) [![Nuget](https://img.shields.io/nuget/dt/Lepo.i18n?label=nuget)](https://www.nuget.org/packages/Lepo.i18n/) [![Sponsors](https://img.shields.io/github/sponsors/lepoco)](https://github.com/sponsors/lepoco)\n\n## 👀 What does this repo contain?\n\nThis repository contains the source code for the Lepo.i18n NuGet packages.\n\n## Gettings started\n\nLepo.i18n is available as NuGet package on NuGet.org:  \nhttps://www.nuget.org/packages/Lepo.i18n  \nhttps://www.nuget.org/packages/Lepo.i18n.DependencyInjection  \nhttps://www.nuget.org/packages/Lepo.i18n.Wpf  \nhttps://www.nuget.org/packages/Lepo.i18n.Json\n\nYou can add it to your project using .NET CLI:\n\n```powershell\ndotnet add package Lepo.i18n.Wpf\ndotnet add package Lepo.i18n.DependencyInjection\n```\n\n, or package manager console:\n\n```powershell\nNuGet\\Install-Package Lepo.i18n.Wpf\nNuGet\\Install-Package Lepo.i18n.DependencyInjection\n```\n\n### 🛠️ How to Use Lepo i18n\n\n#### 1. Read localizations\n\nIn this step, we register our localizations in the DI container.\n\n```csharp\nIHost host = Host.CreateDefaultBuilder()\n  .ConfigureServices((context, services) =\u003e\n    {\n      services.AddStringLocalizer(b =\u003e\n      {\n        b.FromResource\u003cTranslations\u003e(new(\"pl-PL\"));\n        b.FromYaml(assembly, \"Lepo.i18n.Resources.Translations-en.yaml\", new(\"en-US\"));\n      });\n    }\n  )\n  .Build();\n```\n\n#### 2. Localize!\n\n```xml\n\u003cGrid\u003e\n  \u003cCheckBox\n    Grid.Row=\"1\"\n    Content=\"{i18n:StringLocalizer 'Leave the keys that were pressed marked.'}\"\n    IsChecked=\"{Binding ViewModel.PreviewKeys, Mode=TwoWay}\" /\u003e\n\u003c/Grid\u003e\n```\n\n## Compilation\n\nTo build the project, use Visual Studio 2022 and open the .sln file.\n\nVisual Studio  \n**Lepo.i18n** is an Open Source project. You are entitled to download and use the freely available Visual Studio Community Edition to build, run or develop for Lepo.i18n. As per the Visual Studio Community Edition license, this applies regardless of whether you are an individual or a corporate user.\n\n## Code of Conduct\n\nThis project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.\n\n## License\n\n**Lepo.i18n** is free and open source software licensed under **MIT License**. You can use it in private and commercial projects.  \nKeep in mind that you must include a copy of the license in your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flepoco%2Fi18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flepoco%2Fi18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flepoco%2Fi18n/lists"}