Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:50:10+00:00 2026-06-12T23:50:10+00:00

When writing libraries, I’ve taken to moving all my string literals to the resource

  • 0

When writing libraries, I’ve taken to moving all my string literals to the resource file, even if they are something end users never see, and I don’t have a need for translating the literal for other developers benefit (as the libraries are only developed by one team).

Recently someone doing a code review asked why I had put some strings for an exception message (which the end user will never see) into the resource file. I assume because we know this string won’t need to be translated.

I personally like it because I’ve found often times the string will be needed multiple places, and it ends up functioning the same way as a constant as the resx has a code file generated for me, so I don’t need to maintain it myself.

I’d like to know if there are any standard conventions, best practices or offical guidelines. Bear in mind that this is only for message like string, other strings that would be more appropriate as constants I do create as constants, so I’m only talking about exception messages or messages logged to something like log4net.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:50:11+00:00Added an answer on June 12, 2026 at 11:50 pm

    There are many benefits to using resources for string literals. I have often found out that they are great for aggregating error/success/validation messages. When a product is going to be completed, it is common practice to collect all the messages so you can train helpdesk to answer questions based on what users see.

    To this end, resources provide an easy to access centralized resource to manage all your messaging to the end user.

    Also, if you want to change the language used on a particular condition, it is much easier to change one resource location and affect the whole library/app. Otherwise you will need to do a find/replace, and a new developer thrown into a project may just update one place and miss the other locations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an applet, which uses ~10 external libraries. Together they occupy more than
Are there jQuery or JavaScript libraries or plugins for writing something like mind-mapping ?
There are many libraries for reading/writing/appending text from/into a csv file in java. Which
My team's current project involves re-writing retrieval libraries in JavaScript. We are basically looking
I have been given the task of re-writing some libraries written in C# so
When writing programs (C#.NET) I'll commonly use external libraries I've downloaded from various websites
I'm writing FTP client handler in Java and I can't use FTP libraries like
I'm writing a Python open-source app. My app uses some open source Python libraries.
Any libraries to aid writing programs with source code shaped like drawings (such as
I'm writing a game in C using the Gtk libraries, in which the player

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.