KebabGGbab.Localization 1.0.0

dotnet add package KebabGGbab.Localization --version 1.0.0
                    
NuGet\Install-Package KebabGGbab.Localization -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KebabGGbab.Localization" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KebabGGbab.Localization" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="KebabGGbab.Localization" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KebabGGbab.Localization --version 1.0.0
                    
#r "nuget: KebabGGbab.Localization, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package KebabGGbab.Localization@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KebabGGbab.Localization&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=KebabGGbab.Localization&version=1.0.0
                    
Install as a Cake Tool

Localization

The library is designed to simplify the process of localizing applications, primarily desktop ones. Currently, the library supports changing the current UI language culture without restarting the application, a localization service (the current thread by default), support for multiple localization providers, and markup extensions for the WPF and AvaloniaUI frameworks.


Get Started

Localization can be installed using the NuGet package manager or the .NET CLI.

Install-Package KebabGGbab.Localization
Install-Package KebabGGbab.Localization.WPF
Install-Package KebabGGbab.Localization.AvaloniaUI

Example

Samples

There are short samples to run localization on supported frameworks.

Configure

If you use dependency injection, you can write your own extension to IServiceCollection by calling IServiceCollection.AddLocalization(), optionally passing the initial culture and localization service, and add a localization provider, such as the Resx file provider implemented in the library and added by calling IServiceCollection.AddResxLocalization(), passing the ResourceManager generated by the ResXFileCodeGenerator tool, as well as all supported cultures. For example:

    public static class LocalizationExtensions
    {
        public static IServiceCollection AddLocalizationWithResx(this ServiceCollection services)
        {
            ArgumentNullException.ThrowIfNull(services);

            services.AddLocalization(); // or services.AddLocalizationWPF() if you are developing a WPF application.
            services.AddResxLocalization(StringsUI.ResourceManager, [CultureInfo.GetCultureInfo("ru-RU"), CultureInfo.GetCultureInfo("en-US")]);

            return services;
        }
    }

xaml

Once the library is configured, you can use it in XAML. To do this, add the namespace:

  • in WPF:
xmlns:l="clr-namespace:KebabGGbab.Localization.WPF;assembly=KebabGGbab.Localization.WPF"
  • in AvaloniaUI:
xmlns:l="https://github.com/KebabGGbab"

and use it like this:

Title="{l:Localization MainWindowTitle}"

where MainWindowTitle is the resource key.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on KebabGGbab.Localization:

Package Downloads
KebabGGbab.Localization.AvaloniaUI

Localization WPF and AvaloniaUI application

KebabGGbab.Localization.WPF

Localization WPF and AvaloniaUI application

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 132 5/28/2026

Initialization of the Core project, as well as projects for the WPF and AvaloniaUI frameworks. Support for the following features: changing the current UI culture, culture service, UI culture change notifications, adding multiple localization providers, and localization via XAML markup extensions.