Fluently Localizing Strings in .NET without using Resource Files

Thread.CurrentThread.CurrentCultureResource files are great, for larger blocks of text. Often, however, you have shorter pieces of text (such as labels, short sentences, etc) and you don’t want to go through the hassle of dealing with resource files. LocalizedString can help.
Using the library is simple. Define a variable and set the invariant text value. Then, you can add any additional translations, in-line. Calling ToString() method will return the translation according to the current Thread.CurrentThread.CurrentCulture value. If no appropriate translation can be found — the invariant value will be used, or the closest match.
If you’ve defined a translation for say 'FR-ca' and the current culture is 'FR', then'FR'translation will be used.
When using FluentValidation, you can further use LocalizedString.FluentValidation package to enable in-line translation definitions for error messages and fields.
Here’s and example usage with FluentValidation:
- Enjoy responsibly!
