Why RESX Naming Matters in .NET Core

When your app starts supporting multiple languages, your resource files can quickly become a mess unless you establish a solid naming convention.
Here’s the structure I recommend:
FormErrorMessage[FieldName][ValidationType]
FormDisplayName[FieldName]
This ensures:
- ✅ Predictable structure for developers and translators
- ✅ Easy lookup in
SharedResources
- ✅ Consistency across forms and models
⚠️ The RESX Naming Mistake That Bit Me
❌ Do NOT use periods (.
) in your RESX keys.
I learned the hard way: C# cannot resolve resource keys with dots when used in attributes like [Required(...)]
. You'll get silent failures or runtime exceptions when validation runs.
I had to rename all my keys after realizing this broke across dozens of models. Learn from my mistake:
// ❌ This fails:
[Required(ErrorMessageResourceName = "Form.Error.FirstName.Required")]
// ✅ This works:
[Required(ErrorMessageResourceName = "FormErrorMessageFirstNameRequired")]
Use PascalCase or underscores — never dots — in your RESX keys.
✅ Example Model with RESX Validation
[Required(ErrorMessageResourceType = typeof(SharedResources), ErrorMessageResourceName = "FormErrorMessageFirstNameRequired")]
[StringLength(127, ErrorMessageResourceType = typeof(SharedResources), ErrorMessageResourceName = "FormErrorMessageFirstNameLength")]
public string FirstName { get; set; } = string.Empty;
🔹 Suggested RESX Keys
Here’s a sample of keys I use in my own stack:
FormDisplayNameFirstName = First Name
FormErrorMessageEmailInvalid = Please enter a valid email address
FormErrorMessagePasswordLength = Password must be at least 8 characters
- …and dozens more for profiles, avatars, bios, music genres, and social links.
Want a multilingual .resx
file for your project? Just ask me — I can tailor it to your needs.
💰 Localization That Makes Money
Most developers stop at translation. I focus on conversion.
With 30+ years of business experience, I design websites that bring in new customers, increase retention, and monetize international audiences.
Ask me how one form tweak added $25,000 in recurring annual revenue.
🌐 Bonus: Currency Symbols by Culture
I’ve built in mappings for 20+ currencies to support localized donations, subscriptions, and pricing strategies:
string[] currencySymbols = { "$", "€", "£", "¥", "₹", "₽", "₩", "₺", "฿", "R$", "₦", "zł", "kr", "Rp", "﷼", "د.إ" };
You won’t find this in the docs — but it’s already in DevStack.
🚀 Want This Done For You?
If you're wrestling with multilingual forms, validation headaches, or RESX chaos, I’ve already solved it.
I've got all the obvious keys for forms, menus, and more, ready made.
Want more? send me a list of key pairs and I will return resx files in as many languages as you like!
I promise you ChatGPT is no help on this one! ResXmanager is a great tool, available as a plugin for Visual Studio but hooking up with translation providers will drive you crazy.
I have another, top secret tool that crashes this out!
- See my CV and DevStack
- Explore pricing and services
- Or just contact me for a chat
Let's make localization your strength, not a stress.