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 92535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:12:08+00:00 2026-05-10T23:12:08+00:00

I am working in a .NET environment where the system occasionally generates log entries

  • 0

I am working in a .NET environment where the system occasionally generates log entries for a customer. Messages are then appended to a customer log which can be reviewed at a later time.

For example, if a customer is subscribing to a new service, or a customer has a failed payment attempt, these messages gets appended to the customer log.

At the moment, all messages are hardcoded into the code, e.g ‘Customer failed to finish payment of XX’.

The problem is now that these messages need to be localized in a smart way, such that when a English user reviews the customer log, he gets the messages in English, and when a foreign user reviews the log, he gets them in his language.

What would be the best way to handle this scenario?

  • 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. 2026-05-10T23:12:08+00:00Added an answer on May 10, 2026 at 11:12 pm
    • Log event identifiers rather than messages.
    • Capture event specific data along with the event identifier.
    • When a user views the log, localize the event message based on the unique identifier.

    The problem you’ll run into is if you try to insert dynamic data into the messages in a conversational fashion. For example, if you have to write ‘No messages found’ vs. ‘One message found’ vs. ‘X messages found’ is problematic – in English we have different pluralities for zero, one, and more than one… but it’s not necessarily like that in other languages. Things like numbers or dates are less problematic to insert in String.Format form, but you don’t want to get in the business of trying to dynamically generate real language in a localized fashion.

    I’d recommend following a pattern a lot like the Windows Event Log where you output an event ID, a localized message based on the event ID, and then capturing certain ‘fields’ where you’ll localize the field name and the display format of the field, like ‘Amount: $2.00’ or whatever. It may not be the prettiest way to go, but unless you’ve got a full-time linguist dedicated to this and you intend on accounting for all the little nuances of every language, I’d punt and go with a simpler log output format.

    In your given example, you’d separate the log message from the data, like:

    Customer failed to finish payment.
    Amount: XX

    You’d log a message ID, like ‘13579’ might be the unique ID for the event when a customer fails to finish a payment. Finally, you could store the value as a separate field.

    How you go about figuring out how many fields to allocate to an event or how to store the data is… well, an exercise best left to the reader.

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

Sidebar

Related Questions

I come from a VB.Net environment, where using Imports System and then IO.Directory.GetFiles(...) works.
I am working on ASP.NET 4.0 MVC3 web application that works in intranet environment.
I am working on a project where a 3rd party has a .NET environment
I have created a folder lock in C#.NET which is working good on NTFS
I am working on a large scale ASP.NET web app. The system is large
I am relatively new to asp.net environment. Recently working on a project, i discovered
I have an ASP.NET 2.0 application that is working fine in our local environment.
While working with ASP.NET MVC, I have noticed that exception messages issued by the
I am working on a project that involves an embedded system which runs a
I have started working on a legacy project (ASP.NET 1.1) which was done in

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.