NuvTools.Resources
10.1.3
dotnet add package NuvTools.Resources --version 10.1.3
NuGet\Install-Package NuvTools.Resources -Version 10.1.3
<PackageReference Include="NuvTools.Resources" Version="10.1.3" />
<PackageVersion Include="NuvTools.Resources" Version="10.1.3" />
<PackageReference Include="NuvTools.Resources" />
paket add NuvTools.Resources --version 10.1.3
#r "nuget: NuvTools.Resources, 10.1.3"
#:package NuvTools.Resources@10.1.3
#addin nuget:?package=NuvTools.Resources&version=10.1.3
#tool nuget:?package=NuvTools.Resources&version=10.1.3
Nuv Tools Resources for .NET
A comprehensive localization library providing common UI resources (fields, actions, messages, and validation messages) for .NET applications in English and Portuguese (pt-BR).
Features
- Bilingual Support: English and Portuguese (pt-BR)
- Four Resource Types: Actions, Fields, Messages, and FluentValidation Messages
- 477+ Localized Resources: 49 actions, 311 fields, 117 messages
- Strongly-Typed Access: Static properties with compile-time safety
- ResourceManager Support: Runtime key lookup for dynamic scenarios
- .NET Multi-targeting: Supports .NET 8, 9, and 10
- FluentValidation Integration: Dedicated resources for FluentValidation messages
What's New in v10.0.0
- Actions Resources Separated: Action verbs (Add, Edit, Delete, Save, etc.) moved from Fields to dedicated Actions.resx for better organization
- Messages Cleanup: Removed 51 redundant messages that can be replaced by parameterized templates (e.g., use
XNotFoundwith parameter instead ofUserNotFound,TokenNotFound, etc.) - New Template Messages: Added
ConfirmXtemplate for generic confirmations - Enhanced Documentation: Interactive dictionary pages for browsing all resources with translations
- Modern Solution Format: Using .slnx (XML-based) solution file format
Installation
dotnet add package NuvTools.Resources
Or via NuGet Package Manager:
Install-Package NuvTools.Resources
Resource Types
Actions
User interface action verbs and commands (49 resources)
using NuvTools.Resources;
var addButton = Actions.Add; // "Add" / "Adicionar"
var saveButton = Actions.Save; // "Save" / "Salvar"
var deleteButton = Actions.Delete; // "Delete" / "Excluir"
var cancelButton = Actions.Cancel; // "Cancel" / "Cancelar"
Note: Actions were separated from Fields in v10.0.0 for better semantic organization.
Fields
Common UI field labels and terms (311 resources)
using NuvTools.Resources;
var accountLabel = Fields.Account; // "Account" / "Conta"
var emailLabel = Fields.Email; // "E-mail"
var nameLabel = Fields.Name; // "Name" / "Nome"
var addressLabel = Fields.Address; // "Address" / "Logradouro"
Messages
User-facing notifications and validation messages (117 resources)
using NuvTools.Resources;
var successMsg = Messages.OperationPerformedSuccessfully; // "Operation performed successfully."
var notFoundMsg = string.Format(Messages.XNotFound, "User"); // "User not found."
var confirmMsg = string.Format(Messages.ConfirmX, "deletion"); // "Confirm deletion?"
FluentValidation Messages
Validation error messages for FluentValidation integration
using NuvTools.Resources;
// FluentValidation-specific messages (accessed via ResourceManager)
var notEmptyMsg = FluentValidationMessages.ResourceManager.GetString("NotEmpty");
var emailMsg = FluentValidationMessages.ResourceManager.GetString("EmailValidator");
Localization
Resources automatically adapt to the current UI culture:
using System.Globalization;
using NuvTools.Resources;
// Set culture to Portuguese
CultureInfo.CurrentUICulture = new CultureInfo("pt-BR");
Console.WriteLine(Fields.Name); // Output: "Nome"
// Set culture to English
CultureInfo.CurrentUICulture = new CultureInfo("en");
Console.WriteLine(Fields.Name); // Output: "Name"
Resource Access
The library provides two ways to access resources:
Static Properties (Recommended)
Strongly-typed properties with compile-time safety:
using NuvTools.Resources;
// Actions, Fields, and Messages provide static properties
var addAction = Actions.Add; // "Add" / "Adicionar"
var nameField = Fields.Name; // "Name" / "Nome"
var successMsg = Messages.Success; // "Success!" / "Sucesso!"
ResourceManager (Runtime Lookup)
Use ResourceManager when you need to look up resources by string keys at runtime:
using System.Globalization;
using NuvTools.Resources;
// All resource classes expose a ResourceManager property
var action = Actions.ResourceManager.GetString("Add");
var field = Fields.ResourceManager.GetString("Name");
var message = Messages.ResourceManager.GetString("Success");
// Specify culture explicitly
var localizedField = Fields.ResourceManager.GetString("Name", new CultureInfo("pt-BR")); // "Nome"
var localizedAction = Actions.ResourceManager.GetString("Add", new CultureInfo("pt-BR")); // "Adicionar"
// FluentValidation messages
var notEmptyMsg = FluentValidationMessages.ResourceManager.GetString("NotEmpty");
Building the Project
# Build
dotnet build
# Build for Release
dotnet build -c Release
# Create NuGet package
dotnet pack -c Release
Documentation
Complete Resource Dictionaries
Browse searchable dictionaries with all available resources and their English/Portuguese translations:
| Dictionary | Resources | Description |
|---|---|---|
| Actions | 49 | Action verbs and commands (Add, Edit, Delete, Save, Search, etc.) |
| Fields | 311 | Form field labels and UI elements (Account, Name, Email, Address, etc.) |
| Messages | 117 | User messages and validation templates (XNotFound, XInvalid, XRequired, etc.) |
These dictionaries are perfect for:
- Finding the right resource key before coding
- Browsing available translations
- Ensuring consistency across your application
Target Frameworks
- .NET 8
- .NET 9
- .NET 10
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Releasing
Publishing to nuget.org is irreversible per version, so the workflow makes it the last and smallest step.
The package has its own workflow, and the steps live in the reusable package-publish.yml, the
same layout as the other NuvTools repositories.
| Package | Workflow | Release tag |
|---|---|---|
NuvTools.Resources |
resources-publish.yml |
resources-vX.Y.Z |
- Set the package's
<Version>in its.csprojand merge it. That is the version that gets published; the workflow reads it and never computes one. - Run the library's workflow by hand (Actions → Resources Publish → Run workflow) with push checked.
- The workflow builds the solution with
-warnaserror, runs the tests, takes that package only from the build output, verifies it carries its README, licence, icon, symbols and every target framework, and then waits for approval on thenugetGitHub Environment before pushing. - After the push succeeds, the workflow tags the commit with the tag in the table above. The tag is a
record of what is on nuget.org, never what starts a release, so it cannot exist for a version
that did not get there. A run whose tag already exists stops before building: the version has
been released and
<Version>needs a bump.
Versions published by hand are refused. Releases made before these workflows exist on nuget.org with no tag. Pushing one again would skip the duplicate and then tag the current commit as a release it is not, so a version that is already on nuget.org stops the run. The exception is a re-run of the same run, which is how a push that succeeded and a tag that failed gets finished.
No API key is stored. The push uses nuget.org's trusted publishing: the job presents a GitHub
OIDC token, nuget.org checks it against the policy registered for this repository and answers with a
key that lives for one hour. The repository needs one secret, NUGET_USER — the nuget.org profile
name the policy belongs to — and the policy itself, registered under Trusted Publishing on
nuget.org with the owner nuvtools, the repository nuvtools-resources, the workflow file and the
environment nuget.
Run a library's workflow by hand with push unchecked for a dry run that stops after the verification.
License
This project is licensed under the terms specified in the LICENSE file.
Links
| Product | Versions 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 is compatible. 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 is compatible. 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NuvTools.Resources:
| Package | Downloads |
|---|---|
|
NuvTools.Security.Identity.Models
ASP.NET Identity base models, form DTOs, and API models with localized validation for user and role management. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.1.3 | 43 | 10/15/2026 |
| 10.1.2 | 894 | 9/14/2026 |
| 10.1.1 | 3,028 | 1/27/2026 |
| 10.1.0 | 142 | 1/23/2026 |
| 10.0.0 | 343 | 12/6/2025 |
| 9.0.2 | 1,528 | 5/24/2025 |
| 9.0.1 | 290 | 5/23/2025 |
| 9.0.0 | 320 | 11/13/2024 |
| 8.1.3 | 305 | 10/15/2024 |
| 8.1.2 | 234 | 10/14/2024 |
| 8.1.1 | 285 | 9/9/2024 |
| 8.1.0 | 526 | 4/9/2024 |
| 8.0.0 | 469 | 1/28/2024 |
| 7.1.1 | 469 | 11/2/2023 |
| 7.1.0 | 245 | 11/2/2023 |
| 7.0.0 | 772 | 2/25/2023 |