Question

I have a web application which should be Localized to 3 languages. All the controls are taking the control text from the Resx file of that language. Now I have scenario like suppose if we have a messages,custom error messages to show for that particular culture. So for this I have created a seperate Foldere as "Resources" and created a resx as "DialogMessages.ar-IQ.resx".

How can I read the "DialogMessages.ar-IQ.resx" in C# ?

I have tried to read the file using ResxResourceReader class. Is this a correct process or any flaw exists ?

No correct solution

OTHER TIPS

You can use ResXResourceReader and specifying the resource file location properly .

     ResXResourceReader reader = new ResXResourceReader("Map path with resource file");
                IDictionaryEnumerator iterator = reader.GetEnumerator();
                while (iterator.MoveNext())
                {
// process the collection of key value pair.
                }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top