Flowsy.Localization 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Flowsy.Localization --version 1.0.0                
NuGet\Install-Package Flowsy.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="Flowsy.Localization" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Flowsy.Localization --version 1.0.0                
#r "nuget: Flowsy.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.
// Install Flowsy.Localization as a Cake Addin
#addin nuget:?package=Flowsy.Localization&version=1.0.0

// Install Flowsy.Localization as a Cake Tool
#tool nuget:?package=Flowsy.Localization&version=1.0.0                

Flowsy Localization

Basic functionality for multi-lingual support.

Requirements

In order to provider multi-lingual support, applications must provide resource files with translations for every supported culture. For example, if our project contains a directory named Resources with the files Shared.en-us.resx and Shared.es-mx.resx we can load the right translation for the current culture by calling:

// Given the resource files for en-US and es-MX:
// /path/to/the/project/Resources/Shared.en-us.resx
// /path/to/the/project/Resources/Shared.es-mx.resx
// we can configure the default resource base name to look for strings
// taking its path from the root of our project, using dots instead of directory separators and excluding the culture name and extension
LocalizationResources.DefaultResourceBaseName = "Resources.Shared";

// Load translation specifying the assembly containing the resource files
var localizedString1 = "StringId".Localize(typeof(SomeClass).Assembly);

// Load translation using resource files from the assembly calling Localize 
var localizedString2 = "StringId".Localize();

Optionally, we can use a resource file different from LocalizationResources.DefaultResourceBaseName by calling Localize with a custom name as its last argument.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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. 
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 Flowsy.Localization:

Package Downloads
Flowsy.Repository.Sql

Repository implementation for SQL databases.

Flowsy.Web.Api

Foundation components for Web APIs.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.1 8,508 11/6/2022
2.0.0 1,977 10/25/2022
1.0.0 385 10/17/2022