resource-files

Reading .resx files programatically

I have an application where the contents of e-mails that get sent are stored in a .resx file. This is an ASP.Net application, the .resx file lives in /App_GlobalResources When I need to send an e-mail, i'm reading this using: HttpContext.GetGlobalResourceObject("MailContents", "EmailID").ToString Now, I need to use the same maili...

How can I create a windows resource to embed in a .NET assembly, starting from text?

I was looking into embedding custom version strings using in assemblies a while back, and one approach that the documentation suggested was to embed a windows resource. The only way I can see to create a windows resource is to use the 'Native Resource Template', but the template is a binary file that isn't suitable for using with subwcr...

VC++ Resource Editor Problem?

I have a working C++ project on VS2005, I made a small change which causes a problem and I dont know what is it and how to resolve, I added a new string entry in the resource file using the VS2005 RC editor (the default one in VS2005) but after compilation I get two compilation errors Error 22 error RC2135 : file not found: BEGIN f:...

Error while using asp.net resource files

I have som text-content that I want to be able to change without recompiling my project. I have created a resource file and put some text-content in it. I was under the impression that I could write <%$ Resources:mapLink2 %> wherever I wanted but that doesn't seem to be the case. The following code in my ascx gives me an error: <a hre...

AjaxControlToolkit Resource Files Not Copied To Output in MSBuild Script

I'm new to MSBuild, but I managed to setup the following simple script: <Project ToolsVersion="3.5" DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; <PropertyGroup> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> </PropertyGroup> <ItemGroup> <S...

Are there any performance issues or caveats with resource (.resx) files?

Resource files seem great for localization of labels and messages, but are they perfect? For example: Is there a better solution if there is a huge amount of resources? Like 100,000 strings in a .resx file? (Theoretically, I do not actually have this problem) Is this a good method for storing the other types of data, such as Images, ...

Culture resouce files

Hi there, I'm working on an ASP.NET app I have a couple of resource files with the different languages I can support example: Language.en.resx Language.pt.resx is there any way to get, for example, a list with all the different languages dinamically? tks ...

How to put variable value inside value of resource file

Hi, I have been working with resource files for a while now and I was wondering if there is some nifty way I don't know of yet to put variables inside a resource value. A simple example: You have bought #amountOfBooksBought books. My current way of working would be to declare two resource values (for 2 labels): BoughtBooksAmo...

RIA Services Localization, where to place Resource Files

I have the following Solution: SomeProject.Ria (non Silverlight code) SomeProject.Ria.Silverlight (Silverlight light code, namespace is still SomeProject.Ria) SomeProject.Ria.MyServices (RIA Services Domain Service) SomeProject.Ria.MyServices.Proxies (RIA Services Silverlight Generated Code) SomeProject.Shell (Silverlight Applicaiton) ...

Handling a mix of server side code and html in a resource file?

I'm trying to convert an ASP.NET web application to use resource files. I haven't used resource files before, so I'm just toying around with them and was wondering if this is possible. I have a message that returns from a search when no results are found, that prompts the user to return to the home page. A lot of these pages have method...

how to use resource files in sharepoint 2010

i want to know the correct path to put my resource files in a web application in sharepoint 2010 ...

Changing where a resource is pulled during runtime?

I have a website that goes out to multiple clients. Sometimes a client will insist on minor changes. For reasons beyond my control, I have to comply no matter how minor the request. Usually this isn't a problem, I would just create a client specific version of the user control or page and overwrite the default one during build time or ma...

Converting between Dev C++ and MSVS projects?

Hello I was wondering about converting between Dev C++ and MSVS projects. I was specifically wondering about the rc files. Are they different formats. I have a project that was made in Dev C++ and I would like to open in in MSVS2010. The linker settings are all set up properly, but the RC file seems to not want to straight-out convert. ...

What is the best way to associate error messages with error codes in C#?

I have a piece of software written in C#.NET that communicates with a device via USB. When a problem occurs the device sets an error code which is read by my software in the form of an integer. I want to store error messages in my C# program that correlate with the specific firmware error codes. What is the best way to store these? I ha...

How do I build a Win32 app with a resource file using cmake and MinGW?

In theory, it's very easy to build a Win32 app with a resource file using cmake. In an add_executable command, a resource file can be listed as easily as a C or C++ source file. There is a known bug, however, when building using MinGW tools. I found a workaround, which is to include the following in CMakeFiles.txt... if(MINGW) set(CM...

Is it possible to define string arrays in .resx resource files?

Currently, I do this: Names -> "name1|name2|name3" Resource.Names.Split('|'); Is it possible to define those names as an array in the resource file so that I don't have to parse by splitting every time? Something like the following perhaps? Names[] -> "name1" Names[] -> "name2" Names[] -> "name3" Resource.Names; // is of type strin...

How to use .net Resource files in javascript

is there anyway i can access my resource files (.resx) in javascript? if no then are there any workarounds to diplay messages in javascript in different languages? ...

Automatically deploy resource files to Central Administration's App_GlobalResources folder when deploying a solution to a web application

I'm developing a SharePoint 2010 solution which consists of some web parts and other components. Furthermore the solution needs a application pages in the Central Administration for configuration. So my solution contains an extra feature which places a custom actions in the Central Administration menu that links to a application page ...