ardalis / GuardClauses

A simple package with guard clause extensions.
MIT License
3.06k stars 270 forks source link

Localization and multi language support #307

Closed mrmoein closed 11 months ago

mrmoein commented 11 months ago

Hello, is there any way to localize exception messages? i want use multiple language

ardalis commented 11 months ago

You should be able to use resource files or similar approaches for your messages in your custom guards. At the moment there's no localization support in the built-in ones. The text from the guard clauses is generally designed for developers to see, not end users. If you're doing end user validation, I recommend something like FluentValidation instead of Guards.