TypealizR 0.9.3

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package TypealizR --version 0.9.3                
NuGet\Install-Package TypealizR -Version 0.9.3                
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="TypealizR" Version="0.9.3">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TypealizR --version 0.9.3                
#r "nuget: TypealizR, 0.9.3"                
#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.
// Install TypealizR as a Cake Addin
#addin nuget:?package=TypealizR&version=0.9.3

// Install TypealizR as a Cake Tool
#tool nuget:?package=TypealizR&version=0.9.3                

build Coverage Status CodeQL Publish

Quality Gate Status Lines of Code Duplicated Lines (%) Code Smells Maintainability Rating Security Rating Bugs Vulnerabilities Reliability Rating Technical Debt

Samples STS Samples LTS

NuGet Nuget NuGet (preview)

TypealizR

The typed internationalizeR

Statically typed i18n support for the .NET - ecosystem

resource-first

✔️ DO this:


@inject IStringLocalizer<HomePage> localize;
@inject AppUser user;

<h1>@localize.Title()<h1>
<h2>@localize.Welcome_back__userName(user.GivenName)<h2>

demo_typealize_translation_initial

DON´T do that:


@inject IStringLocalizer<HomePage> localize;
@inject AppUser user;

<h1>@localize["Title"]<h1>
<h2>@localize["Welcome back, {0}", user.GivenName]<h2>

See resource-first for more details

code-first

✔️ DO this:

void Demo(ILocalizables i18n)
{
    Console.WriteLine(i18n.Hello("Earth")); // Hello Earth
    Console.WriteLine(i18n.Farewell("Arthur")); // So long, 'Arthur'. And thx for all the fish!
    Console.WriteLine(i18n.WhatIsTheMeaningOfLifeTheUniverseAndEverything); // 42
    Console.WriteLine(i18n.Greet(right: "Zaphod", left: "Arthur")); // Arthur greets Zaphod, and Zaphod replies: "Hi!".
}

DON´T do that:

void Demo(IStringLocalizer i18n)
{
    Console.WriteLine(i18n["Hello", "Earth"]); // Hello Earth
    Console.WriteLine(i18n["Farewell", "Arthur"]); // So long, 'Arthur'. And thx for all the fish!
    Console.WriteLine(i18n["WhatIsTheMeaningOfLifeTheUniverseAndEverything"]; // 42
    Console.WriteLine(i18n["Greet", "Arthur", "Zaphod")); // Arthur greets Zaphod, and Zaphod replies: "Hi!".
}

See code-first for more details.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TypealizR:

Package Downloads
TypealizR.Analyzers

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.10.0-pre0013 67 10/30/2024
0.10.0-pre0012 65 10/29/2024
0.10.0-pre0011 74 10/26/2024
0.10.0-pre0010 68 10/26/2024
0.9.9 2,307 5/15/2024
0.9.8 111 5/15/2024
0.9.7 570 5/15/2024
0.9.6 109 5/14/2024
0.9.5 1,865 11/6/2023
0.9.4 1,292 9/19/2023
0.9.3 774 5/13/2023
0.9.2 739 2/5/2023
0.9.2-pre0008 870 2/5/2023
0.8.4 347 1/20/2023
0.8.2 298 12/31/2022
0.8.1 294 12/30/2022
0.8.0 258 12/30/2022
0.8.0-pre0005 283 12/30/2022
0.7.1 310 12/27/2022