Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lepoco/i18n
Convenient localization of Windows applications with YAML files.
https://github.com/lepoco/i18n
csharp dotnet i18n internationalization localization netcore translation windows wpf yaml
Last synced: 3 days ago
JSON representation
Convenient localization of Windows applications with YAML files.
- Host: GitHub
- URL: https://github.com/lepoco/i18n
- Owner: lepoco
- License: mit
- Created: 2022-01-20T00:28:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T07:25:39.000Z (4 months ago)
- Last Synced: 2024-10-06T16:37:49.176Z (about 1 month ago)
- Topics: csharp, dotnet, i18n, internationalization, localization, netcore, translation, windows, wpf, yaml
- Language: C#
- Homepage: https://lepo.co
- Size: 236 KB
- Stars: 44
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 🏃 Lepo i18n
[Created with ❤ in Poland by lepo.co](https://dev.lepo.co/)
Lepo.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.[![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)
## 👀 What does this repo contain?
This repository contains the source code for the Lepo.i18n NuGet packages.
## Gettings started
Lepo.i18n is available as NuGet package on NuGet.org:
https://www.nuget.org/packages/Lepo.i18n
https://www.nuget.org/packages/Lepo.i18n.DependencyInjection
https://www.nuget.org/packages/Lepo.i18n.Wpf
https://www.nuget.org/packages/Lepo.i18n.JsonYou can add it to your project using .NET CLI:
```powershell
dotnet add package Lepo.i18n.Wpf
dotnet add package Lepo.i18n.DependencyInjection
```, or package manager console:
```powershell
NuGet\Install-Package Lepo.i18n.Wpf
NuGet\Install-Package Lepo.i18n.DependencyInjection
```### 🛠️ How to Use Lepo i18n
#### 1. Read localizations
In this step, we register our localizations in the DI container.
```csharp
IHost host = Host.CreateDefaultBuilder()
.ConfigureServices((context, services) =>
{
services.AddStringLocalizer(b =>
{
b.FromResource(new("pl-PL"));
b.FromYaml(assembly, "Lepo.i18n.Resources.Translations-en.yaml", new("en-US"));
});
}
)
.Build();
```#### 2. Localize!
```xml
```
## Compilation
To build the project, use Visual Studio 2022 and open the .sln file.
Visual Studio
**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.## Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
## License
**Lepo.i18n** is free and open source software licensed under **MIT License**. You can use it in private and commercial projects.
Keep in mind that you must include a copy of the license in your project.