SQuan.Helpers.Maui.Localization
10.0.41
dotnet add package SQuan.Helpers.Maui.Localization --version 10.0.41
NuGet\Install-Package SQuan.Helpers.Maui.Localization -Version 10.0.41
<PackageReference Include="SQuan.Helpers.Maui.Localization" Version="10.0.41" />
<PackageVersion Include="SQuan.Helpers.Maui.Localization" Version="10.0.41" />
<PackageReference Include="SQuan.Helpers.Maui.Localization" />
paket add SQuan.Helpers.Maui.Localization --version 10.0.41
#r "nuget: SQuan.Helpers.Maui.Localization, 10.0.41"
#:package SQuan.Helpers.Maui.Localization@10.0.41
#addin nuget:?package=SQuan.Helpers.Maui.Localization&version=10.0.41
#tool nuget:?package=SQuan.Helpers.Maui.Localization&version=10.0.41
SQuan.Helpers.Maui.Localization
The SQuan.Helpers.Maui.Localization provides a localization resource manager, a XAML markup extension and a C# extension method to make localization easier.
Installation
In order to use the toolkit correctly the UseSQuanHelpersMauiLocalization method must be called with your string resource on the MauiAppBuilder class when bootstrapping an application the MauiProgram.cs file. The following example shows how to perform this.
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSQuanHelpersMauiLocalization<AppStrings>()
Include the XAML namespace
In order to use the Localize markup extension in XAML, the following xmlns needs to be added into your page or view:
xmlns:i18n="clr-namespace:SQuan.Helpers.Maui.Localization;assembly=SQuan.Helpers.Maui.Localization"
Include the C# namespace
In order to use the Localize extension method in C#, the following using statement needs to be added into your file:
using SQuan.Helpers.Maui.Localization;
Get/Set culture values through the LocalizationManager
The LocalizationManager provides wrappers for InstalledUICulture,CurrentCulture and CurrentUICulture. These wrappers have property change and other event notification to ensure changes in culture are broadcasted to localized strings.
var de_DE = new CultureInfo("de-DE");
LocalizationManager.Current.CurrentCulture = de_DE; // Set date, time, currency to Germany.
LocalizationManager.Current.CurrentUICulture = de_DE; // Set strings to German.
XAML Localize markup extension example
You can use the Localize markup extension in XAML to assign localize string resources to your text properties, e.g.
<Label
SemanticProperties.HeadingLevel="Level1"
Style="{StaticResource Headline}"
Text="{i18n:Localize LBL_HELLO}" />
C# Localize extension method example
You can use the Localize extension method in C# to assign localize string resources to your text properties with parameters, e.g.
[RelayCommand]
void IncrementCounter()
{
Count++;
CounterBtn.Localize(Button.TextProperty, "BTN_CLICKED_N_TIMES", Count);
SemanticScreenReader.Announce(CounterBtn.Text);
}
C# Localize extension method with bindings
You can use the Localize extension method in C# to assign localization string resources to your text properties with bindings.
public MainPage()
{
BindingContext = this;
InitializeComponent();
CounterBtn.Localize(
Button.TextProperty,
"BTN_CLICKED_N_TIMES",
BindingBase.Create(static (LocalizePage m) => m.Count, BindingMode.OneWay, source: this));
}
[RelayCommand]
void IncrementCounter()
{
Count++;
SemanticScreenReader.Announce(CounterBtn.Text);
}
XAML Localize markup extension with bindings
You can use the Localize markup extension in XAML to assign localize string resources to your text properties with bindings.
<Button
x:Name="CounterBtn"
Command="{Binding IncrementCounterCommand}"
HorizontalOptions="Start"
Text="{i18n:Localize BTN_CLICKED_N_TIMES, X0={Binding Count}}" />
Further information
For more information please visit:
- Documentation: https://github.com/stephenquan/SQuan.Helpers/wiki/Localization
- GitHub repository: https://github.com/stephenquan/SQuan.Helpers
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. net10.0-ios26.0 is compatible. net10.0-maccatalyst26.0 is compatible. net10.0-windows10.0.19041 is compatible. |
-
net10.0-android36.0
- Microsoft.Extensions.Localization (>= 9.0.10)
-
net10.0-ios26.0
- Microsoft.Extensions.Localization (>= 9.0.10)
-
net10.0-maccatalyst26.0
- Microsoft.Extensions.Localization (>= 9.0.10)
-
net10.0-windows10.0.19041
- Microsoft.Extensions.Localization (>= 9.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 10.0.41 | 87 | 2/28/2026 | |
| 10.0.10 | 295 | 11/13/2025 | |
| 9.0.60 | 210 | 11/5/2025 | |
| 9.0.50 | 205 | 10/28/2025 | |
| 9.0.41 | 198 | 10/19/2025 | |
| 9.0.40 | 113 | 10/18/2025 | |
| 9.0.30 | 116 | 10/17/2025 | |
| 9.0.22 | 334 | 9/17/2025 | |
| 9.0.20 | 216 | 7/7/2025 | |
| 9.0.19 | 189 | 7/6/2025 | |
| 1.0.17 | 199 | 6/29/2025 | |
| 1.0.16 | 197 | 6/24/2025 | |
| 1.0.15 | 172 | 6/22/2025 | |
| 1.0.14 | 131 | 6/21/2025 | |
| 1.0.13 | 214 | 6/20/2025 |