resx

The item was specified more than once in the “Resources” parameter. Duplicate items are not supported by the “Resources” parameter

假如想象 提交于 2019-12-04 22:15:07
While compiling my Visual Studio C# project, i am getting the following error: The item "obj\Debug\SampleProject.Forms.MDIMain.resources" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter. However i have searched a lot on internet but none of the solution worked for me. I tried to delete the form and re-added it into the project, but it doesn't work for me. I only have one resx file. I am using VS 2010. Also, i tried the following solutions but it not worked for me: https://stackoverflow.com/a/7928191/2074603 https:/

Run my C# application in different language

老子叫甜甜 提交于 2019-12-04 18:47:57
I have an application which I am trying to run and display in a language other than English which is the default language. I have assigned all text to use property files and have the relevant property files translated for each language. However, when I run the application it is all English. I have set my keyboard, language, locale all to a foreign language and it should automatically pick this up and use the relevant property file automatically, however this is not happening. I know there is not an awful lot of information there, but if you need any more i will provide. I am running the

Performance Overheads when Using Resource Files (.resx)

故事扮演 提交于 2019-12-04 18:02:54
问题 Note, I am aware of the following questions on this topic: Are there any performance issues or caveats with resource (.resx) files? Are string resources (.resx) properties kept in memory? et al. However, I don't find any of the answers in these questions satisfactory (they are not concrete enough). I am also aware of the MSDN pages on this topic, but these also seem to skimp on the technical information regarding the overheads of using resource files. My predicament is that we are about to

What is the recommend way to create a custom culture and associated resource files for a specific Client?

ぐ巨炮叔叔 提交于 2019-12-04 16:11:50
问题 I have client that wants to specifiy their own version of localized content for a subset of my string resources. For simplicity here is basic example: Lets say I have 2 localized strings (showing english content) PageTitle="Hello World" PageDescription="This is a more wordy version of Hello World!" I wish to localize these so I have resource files. Strings.resx (contains my English string) Strings.fr-ca.resx (contains my French-Canadian strings) Strings.fr-ca-clientX.resx (contains my strings

Localization of Text File resources in .NET

一个人想着一个人 提交于 2019-12-04 12:38:47
Localization/Globalization is pretty easy in Visual Studio using RESX files. I just add a resource file, like MyTextSnippets.resx , add key/value pairs, and create copies for every language I'd like to support like MyTextSnippets.de.resx , MyTextSnippets.fr.resx etc. Now think of longer texts, where the String resource editor grid doesn't work very well. No problem, just choose "Add Resource | Add New Text File" from the designer, and you can edit as many text files as you want. Example: I add MyTemplates.resx , and to this RESX I add a file called SomeEmailTemplate.txt . Works fine so far,

using .resx && .resource files in custom server control asp

我怕爱的太早我们不能终老 提交于 2019-12-04 08:47:00
I writing own serverside control and using images that stoores in .resx file.In console application this code works fine: ResXResourceReader rsxr = new ResXResourceReader("Resource1.resx"); foreach (DictionaryEntry d in rsxr) { Console.WriteLine(d.Key.ToString() + ":\t" + d.Value.ToString()); } rsxr.Close(); but here protected override void RenderContents(HtmlTextWriter output) { ResXResourceReader rsxr = new ResXResourceReader("Resource1.resx"); base.RenderContents(output); foreach (DictionaryEntry d in rsxr) { output.Write(d.Key.ToString()); } } I get eror: Could not find file 'C:\Program

Using SQL for localization instead of RESX files in ASP.NET

≡放荡痞女 提交于 2019-12-04 07:31:48
I'm thinking of developing the following but wondering if it already exists out there: I need a SQL based solution for assigning and managing localization text values for an asp.net site instead of using RESX files. This helps maintain text on the site without having to take it down for deployment whenever an update is required. Thanks. We actually went down that path, and ended up with a really really slow web site - ripping out the SQL-based translation mechanism and using the ASP.NET resources gave us a significant performance boost. So I can't really recommend you do that same thing....

Get all available cultures from a .resx file group

好久不见. 提交于 2019-12-04 06:51:18
I need to programatically list the available cultures in a resx file group, but the ResourceManager class doesn't seem to help. I may have : Labels.resx Labels.fr-FR.resx Labels.ro-RO.resx and so on However, how can I find these three (or how many would there be) cultures at runtime? Look for satellite assemblies in your application's directory: for each subdirectory, check if its name corresponds to a culture name, and if it contains a .resources.dll file : public IEnumerable<CultureInfo> GetAvailableCultures() { var programLocation = Process.GetCurrentProcess().MainModule.FileName; var

asp.net: line break \\n in resource .resx file does not work

喜欢而已 提交于 2019-12-04 05:25:23
The "\n" does not work in below code, it's just displayed as "\n" if (!window.confirm(XXXXX.Globalization.LocalResource.InvalidUrl)) { return false; } the string is "Invalid URL! \n Are you sure you want to continue?" in resource resx file. how to make it work? Try shift-enter to create a new line in the designer. Alternatively copy and paste the result from notepad. Another way is to edit the RESX xml manually. The problem is that the RESX designer UI will auto-escape the strings. So your value is actually: "Invalid URL! \\n Are you sure you want to continue?" What worked in my case was this:

Resource (RESX) files messed up

怎甘沉沦 提交于 2019-12-04 04:02:07
I had a resource file named Localize.resx, which contains English strings. I copied and pasted it inside the same folder(App_GlobalResources), VS created a copy, I renamed the copy to Localize.sl.resx and the original to Localize.en.resx. Now everything in codebehind files (Localize.en.designer.cs) is gone. Deleting the designer file and selecting Run Custom Tool generates a new but completely blank designer file. I still have all my strings in both resx's but the designer files are gone (empty) so the application does not build. Any suggestions? This is inside Vs 2010 with ASP.NET MVC