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

  • Home
  • SEARCH
  • 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 3671478
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:29:31+00:00 2026-05-19T02:29:31+00:00

I am working on a web application which I need to localize and internationalize.

  • 0

I am working on a web application which I need to localize and internationalize. It occurred to me that I could do this using a dependency injection framework. Let’s say I declare an interface ILocalResources (using C# for this example but that’s not really important):

interface ILocalResources {
    public string OkString { get; }
    public string CancelString { get; }
    public string WrongPasswordString { get; }
    ...
}

and create implementations of this interface, one for each language I need to support. I would then setup my DI framework to instantiate the proper implementation, either statically or dynamically (for example based on the requesting browsers preferred language).

Is there some reason I shouldn’t be using a DI framework for this sort of thing? The only objection I could find myself is that it might be a bit overkill, but if I’m using a DI framework in my web app anyway, I might as well use it for internationalization as well?

  • 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-05-19T02:29:32+00:00Added an answer on May 19, 2026 at 2:29 am

    If you cannot use an existing resource framework (like that built into ASP.Net) and would have to build your own, I will assume that you at some point will need to expose services that provide localized resources.

    DI frameworks are used to handle service instantiation. Your localization framework will expose services providing localization. Why shouldn’t that service be served up by the framework?

    Not using DI for its purpose here is like saying, “I’m building a CRM app but cannot use DI because DI is not built for customer relations management”.

    So yes, if you’re already using DI in the rest of your application, IMO it would be wrong to not use it for the services handling localization.

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

Sidebar

Related Questions

I have a web application which uses URLs that look like this: http://library.example.com/Register.aspx?query=academic&key=586c70bb-5683-419c-aae9-e596af9ab66a (The
I am working on a web-application in which dynamically-created images are used to display
I'm working profesionally on a php web application which contains contacts, among other data.
I am working on a web application in Java which gets data from servlets
I am working on a .NET 3.5 project which consists of a web application
I'm working on an ASP .NET 2.0 site which uses a Web Application project
I have created a Web Application in asp.net 2.0. which is working fine on
I am working on a web application using Python (Django) and would like to
I'm working in a web application using VB.NET. There is also VisualBasic code mixed
Possible Duplicate: Schema for a multilanguage database I'm working on a web application that

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.