Lepo.i18n.DependencyInjection
2.0.0
dotnet add package Lepo.i18n.DependencyInjection --version 2.0.0
NuGet\Install-Package Lepo.i18n.DependencyInjection -Version 2.0.0
<PackageReference Include="Lepo.i18n.DependencyInjection" Version="2.0.0" />
paket add Lepo.i18n.DependencyInjection --version 2.0.0
#r "nuget: Lepo.i18n.DependencyInjection, 2.0.0"
// Install Lepo.i18n.DependencyInjection as a Cake Addin #addin nuget:?package=Lepo.i18n.DependencyInjection&version=2.0.0 // Install Lepo.i18n.DependencyInjection as a Cake Tool #tool nuget:?package=Lepo.i18n.DependencyInjection&version=2.0.0
🏃 Lepo i18n
Created with ❤ in Poland by 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.
👀 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.Json
You can add it to your project using .NET CLI:
dotnet add package Lepo.i18n.Wpf
dotnet add package Lepo.i18n.DependencyInjection
, or package manager console:
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.
IHost host = Host.CreateDefaultBuilder()
.ConfigureServices((context, services) =>
{
services.AddStringLocalizer(b =>
{
b.FromResource<Translations>(new("pl-PL"));
b.FromYaml(assembly, "Lepo.i18n.Resources.Translations-en.yaml", new("en-US"));
});
}
)
.Build();
2. Localize!
<Grid>
<CheckBox
Grid.Row="1"
Content="{i18n:StringLocalizer 'Leave the keys that were pressed marked.'}"
IsChecked="{Binding ViewModel.PreviewKeys, Mode=TwoWay}" />
</Grid>
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.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Lepo.i18n (>= 2.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Localization.Abstractions (>= 6.0.0)
-
.NETStandard 2.0
- Lepo.i18n (>= 2.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Localization.Abstractions (>= 6.0.0)
-
.NETStandard 2.1
- Lepo.i18n (>= 2.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Localization.Abstractions (>= 6.0.0)
-
net6.0
- Lepo.i18n (>= 2.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Localization.Abstractions (>= 6.0.0)
-
net8.0
- Lepo.i18n (>= 2.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Localization.Abstractions (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Lepo.i18n.DependencyInjection:
Repository | Stars |
---|---|
lepoco/wpfui
WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
|
Version | Downloads | Last updated |
---|---|---|
2.0.0 | 4,568 | 6/1/2024 |