Rhetos.I18NFormatter 6.0.0

Prefix Reserved
dotnet add package Rhetos.I18NFormatter --version 6.0.0
                    
NuGet\Install-Package Rhetos.I18NFormatter -Version 6.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="Rhetos.I18NFormatter" Version="6.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rhetos.I18NFormatter" Version="6.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Rhetos.I18NFormatter" />
                    
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 Rhetos.I18NFormatter --version 6.0.0
                    
#r "nuget: Rhetos.I18NFormatter, 6.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 Rhetos.I18NFormatter@6.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=Rhetos.I18NFormatter&version=6.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Rhetos.I18NFormatter&version=6.0.0
                    
Install as a Cake Tool

I18NFormatter

I18NFormatter is a plugin package for Rhetos development platform. It enables localization of Rhetos applications, using message format compatible with https://github.com/turquoiseowl/i18n.

Note that turquoiseowl/i18n currently supports only .NET Framework, and cannot be used directly in a Rhetos v5 app or later:

  1. You can still use turquoiseowl/i18n if you have the localization implemented in a separate "frontend" app, for example on ASP.NET MVC, that acts as a proxy for Rhetos REST services. In that case, add Rhetos.I18NFormatter package to the Rhetos app in order to make its messages formatted for localization that occurs in the frontend app.
  2. If you want localization implemented directly in the Rhetos app, instead of I18NFormatter package and turquoiseowl/i18n, use any ASP.NET Core localization utility, by configuring Rhetos host with .AddHostLocalization().
    • To use localization with "PO files" (compatible with turquoiseowl/i18n), see Microsoft's recommendations for OrchardCore, and the usage example in Rhetos tutorial: Adding localization.
    • If migrating from turquoiseowl/i18n to OrchardCore, you will need to replace the message parameters in .po files: from %0, %1, ... to {0}, {1}, ...

Features

This plugin formats the Rhetos response messages for end users (for example, a data validation error message) in a specific format to allow the translation of the message by a GetText / PO localization plugin for ASP.NET applications: https://github.com/turquoiseowl/i18n.

For example, the message "Required property {0} is not set", with a parameter value "Name", is reformatted as "[[[Required property %0 is not set|||Name]]]".

GetTranslatableStrings.exe

A command-line utility for extracting translatable strings from the source files. It can be used on generated object model (ServerDom.cs) to extract error messages from miscellaneous business validation.

Installation and configuration

Installing this package to a Rhetos application:

  1. Add 'Rhetos.I18NFormatter' NuGet package, available at the NuGet.org on-line gallery.

How to contribute

Contributions are very welcome. The easiest way is to fork this repo, and then make a pull request from your fork. The first time you make a pull request, you may be asked to sign a Contributor Agreement. For more info see How to Contribute on Rhetos wiki.

Building and testing the source code

  • Note: This package is already available at the NuGet.org online gallery. You don't need to build it from source in order to use it in your application.
  • To build the package from source, run Clean.bat, Build.bat and Test.bat.
  • For the test script to work, you need to create an empty database and a settings file test\TestApp\ConnectionString.json with the database connection string (configuration key "ConnectionStrings:RhetosConnectionString").
  • The build output is a NuGet package in the "Install" subfolder.
Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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

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
6.0.0 58 9/5/2025
5.0.0 588 3/25/2022
1.1.0 848 9/9/2019
1.0.0 2,675 10/6/2018