Naveen M

Hi Please help me out here!!!

I am developing a Multilingual applications using C# .For this implementation I am using .resx files per language and using Resourcemanager object I am getting values from those file.

Now my problem is here¡­

I do have more than 50000 records and in each .resx (per language).Then while trying to edit (.resx) files my system getting hanged up. So I am planning to split (.resx ) files into multiple files so that I can edit my key values easily.

My requirements:

I want to use multiple files per culture, But while using those I want to create only single object for resourcemanager. I don¡¯t want get developer to confuse to find out which key in which file.

Please help me out here as early as possible!!!!!



Re: Windows Forms General Can i use multiple .resx file for single culture....?

Matthew Watson

All the resx files for a single culture for a single assembly will be combined together, so you should be able to do that.

Just do "Add | New Item..." to your project and select "Resources File".

The thing is, Visual Studio will create a wrapper class for it, and each resources file will have a differently named wrapper class, so you'll have to deal with that in your code when accessing the resources. (Not a hard thing to do.)




Re: Windows Forms General Can i use multiple .resx file for single culture....?

Naveen M

Hi Matthew ,

Thanks for reply....

Actuially i made a utility, Which take .resx files and it generates sattlelate assemblies for all languages.

UTILITy Steps

1) It reads all the .resx(like:- MyRes1.en-US.resx,MyRes2.en-US.resx,MyRes1.es-ES.resx,MyRes2.es-ES.resx,MyRes1.fr-FR.resx,,MyRes2.fr-FR.resx) filies.

2) it generates .resources for all .resx files using resgen

3) Reading all the resources belongs to same cultuer and append to new .resources(like MyRes.en-US.resources,MyRes.es-ES.resources,MyRes.fr-FR.resources)(After this step i do have one .resources file for one langauage)

4) using AL.Exe i am generating sattleate assemblies for all languages.

Like:- en-US\\MyRes.resources.dll

es-ES\\MyRes.resources.dll

fr-FR\\MyRes.resources.dll

So after this in my client application

simply i can use MyRes as base name and i can get any key value from any file....

But i dont want to use any seperate utility like this...

As u said that:- we can work arround wraper class...

Once if i add .resx files to my project(specify name as culture specific MyRes1.en-US.resx) then i am not getting that wraper class...!!!

So how can i go ahead to implement same logic of my utility in direct clinet application.....





Re: Windows Forms General Can i use multiple .resx file for single culture....?

Matthew Watson

If you add a resource without the locale-specific suffix (eg "en-US") to your project, it should create a wrapper class for it. I think you could than add the locale-specific resources to your project. I haven't tried this myself, but it might work.

Another alternative may be to use ILMerge to merge your resources (but that is a separate utility of course).