Linguini.Bundle 0.8.1

dotnet add package Linguini.Bundle --version 0.8.1
NuGet\Install-Package Linguini.Bundle -Version 0.8.1
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="Linguini.Bundle" Version="0.8.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Linguini.Bundle --version 0.8.1
#r "nuget: Linguini.Bundle, 0.8.1"
#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 Linguini.Bundle as a Cake Addin
#addin nuget:?package=Linguini.Bundle&version=0.8.1

// Install Linguini.Bundle as a Cake Tool
#tool nuget:?package=Linguini.Bundle&version=0.8.1

Linguini Bundle

Construct a bundle

Linguini Bundle is the main API for accessing Fluent templates. It takes input, locale and useful localization functions.

First way is to construct is using a fluent/chainable API to create a bundle.

var bundle = LinguiniBuilder.Builder()
    .CultureInfo(new CultureInfo("en"))
    .AddResource("loc = Localization value")
    .AddFunction("idfunc", (args, _) => args[0]);
    .UncheckedBuild();

Here we set loc value for English language and pass an idfunc that just returns the first argument passed. By using UncheckedBuild() we get a guaranteed bundle, but any error will become an Exception. If we used Build() the result would be a tuple of type (FluentBundle, List<FluentError>).

Another way to construct a bundle is to provide a FluentBundleOption.

var defaultBundle = new FluentBundleOption
{
    CultureInfo = new CultureInfo("en"),
    Functions =
    {
        ["idfunc"] = (args, _) => args[0]
    },
    // Note no resource added!
};
var bundle = FluentBundle.FromBundleOptions(defaultBundleOpt);
bundle.AddResource("loc = Localization value", out _);

Both methods are nearly the same, but FluentBundleOption doesn't provide Resources. They can be added vie BundleOptions AddResource.

Product 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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Linguini.Bundle:

Repository Stars
OpenRA/OpenRA
Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.
space-wizards/RobustToolbox
Robust multiplayer game engine, used by Space Station 14
mtkennerly/ludusavi-playnite
Playnite plugin for save backups via Ludusavi
Version Downloads Last updated
0.8.1 235 2/1/2024
0.8.0 92 1/23/2024
0.7.0 523 11/19/2023
0.6.1 195 10/23/2023
0.6.0 13,854 9/13/2023
0.5.0 16,493 6/14/2023
0.4.0 9,831 2/7/2023
0.3.2 7,433 11/19/2022
0.3.1 16,985 9/19/2022
0.3.0 653 5/30/2022
0.2.2 8,257 4/25/2022
0.2.1 408 4/25/2022
0.2.0 465 4/23/2022
0.1.4 400 4/23/2022
0.1.3 830,377 2/13/2022
0.1.2 11,498 12/22/2021
0.1.1 320 7/19/2021