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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:22:51+00:00 2026-06-12T11:22:51+00:00

I use Resources to store different string for localization purposes in my MVC application.

  • 0

I use Resources to store different string for localization purposes in my MVC application.
I am using an HttpHandler to process JavaScript and change the Translate(KEY) calls to the actual localized string value from the resource.
This comes for here: Localize text in JavaScript files in ASP.NET

The problem is when i call the getObject Method from my Resource manager I get MissingManifestResourceException Could not find any resources appropriate for the specified culture or the neutral culture.

here Is the relevant code portion (The error comes from line 6 in the snippet below):

private string TranslateScript(string text)
{
    MatchCollection matches = REGEX.Matches(text);
    ResourceManager manager = new ResourceManager(typeof(CamelotShiftManagement.Strings.SharedStrings));

    foreach (Match match in matches)
    {
        object obj = manager.GetObject(match.Groups[1].Value, CultureInfo.CurrentCulture); //This throws the MissingManifestResourceException for some reson!!!!
        if (obj != null)
        {
            text = text.Replace(match.Value, CleanText(obj.ToString()));
        }
    }

    return text;
}

What am I doing wrong ?

  • 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-12T11:22:52+00:00Added an answer on June 12, 2026 at 11:22 am

    Okay, I found the problem but I can’t explain why is that happening. (yet)

    I found this post Problems with ResourceManager and neutral culture in Asp.Net MVC
    and followde the steps he did.
    I have chage the line:

    ResourceManager manager = new ResourceManager(typeof(CamelotShiftManagement.Strings.SharedStrings));
    

    To:

    ResourceManager manager = CamelotShiftManagement.Strings.SharedStrings.ResourceManager;
    

    Basically it seems as thou each resource file has a static referance to a ResourceManager that handles this resource file.

    That solved my problem.
    Having said that, I am still unsure as to why the method I used before did not work…

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

Sidebar

Related Questions

I need to use image resources from an iOS application that I'm porting to
I read about String Resources and I understood that you simply use the getString(...)
In my current application I want to implement ASP.Net localization with global resources. I
I am attempting to use resources to auto generate routes for my resource. The
R class on android has it's limitations. You can't use the resources dynamically for
I do not want to use the graphics resources to create the dialog! What
I use Module Autoloader to autoload resources (forms, Doctrine models etc.). I do not
I am trying to use getResources to display multiple resources withing one resource, including
Are there any resources on how do I use the not() syntax in a
How to use cryptography with XML documents used for rails Active resources? Or, is

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.