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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:38:57+00:00 2026-05-13T00:38:57+00:00

There are plenty of tutorials how to create multilanguage RESX files and how to

  • 0

There are plenty of tutorials how to create multilanguage RESX files and how to create satellite assemblies with AL.exe, but I haven’t found working example how to embed RESX/Resources/satellite-DLL files in single EXE file and distribute whole multilanguage app as such EXE.

I tried to use ilmerge.exe, but it looks like it doesn’t work for multiple DLLs with the same name (culture satellite DLLs have identical names, originally residing in different subdirs named after culture).

I also don’t know how to create ResourceManager instance to work with embedded resources.

My goals is to enable dynamical switching between closed, pre-defined set of languages. I need class/method which will get culture string (i.e. “de-DE”), resource name (i.e. “CancelText”) and return translated text based on embedded resx/resource/dll.

I’m using VS2008, please note what setting for “build action” is needed in resx/resource files properties sheet. Working code sample or link to tutorial project would be the best.

  • 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-13T00:38:57+00:00Added an answer on May 13, 2026 at 12:38 am

    My solution: program contains only one default language resource file (resx). All other languages are compiled from .resx to .resources and embedded as resource file. Important! I have changed extension because “.resources” is recognized as a special type of resource, so my French files is named “PIAE.LangResources.fr”.

    Here is simple code to retrieve translated string (it should be improved with caching values from resource):

        internal static string GetString(string str, string lang)
        {
    
            if (string.IsNullOrEmpty(str)) throw new ArgumentNullException("empty language query string");
            if (string.IsNullOrEmpty(lang)) throw new ArgumentNullException("no language resource given");
    
            // culture-specific file, i.e. "LangResources.fr"
            Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("PIAE.LangResources."+lang);
    
            // resource not found, revert to default resource
            if (null == stream)
            {                                                                   
                stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("PIAE.Properties.LangResources.resources");
            }
    
            ResourceReader reader = new ResourceReader(stream);
            IDictionaryEnumerator en= reader.GetEnumerator();
            while (en.MoveNext())
            {
                if (en.Key.Equals(str))
                {
                    return en.Value.ToString();
                }
            }
    
            // string not translated, revert to default resource
            return LangResources.ResourceManager.GetString(str);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there are plenty of tutorials about integrating C++ into Java, but whats
There are plenty of examples of sending data to SugarCRM via a web-service, but
There are plenty of options for powerful server side languages, but I can't think
There's plenty of information on running Java apps as services, but I need to
I know there are plenty checkout plugins out there but to be honest -
I know there are plenty of books on C#, but I'd rather learn by
Is there a succinct but complete example project or tutorial that brings together the
There are plenty of C# samples that show how to manipulate files and directories
There are plenty of multipart/form-data file upload solutions out there, but I have not
There are plenty of discussing that shows how to load assemblies from BIN and

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.