tony
tony

Reputation: 309

Reading label text from .resx files in ASP.NET

I am trying to find a way of looping through a .resx file that contains English words and replacing them with the translated equivalent.

I have used a ResXResourceReader to read the file, can anyone help please

Upvotes: 2

Views: 1479

Answers (2)

Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

You can directly get the text by specify key

String Text = GetLocalResourceObject("yourkey").ToString();

Upvotes: 1

alfizqu
alfizqu

Reputation: 148

Could you specify from which side do you want to do it? I mean, if it's just for a developer, that can see the code, you can do it easily changing the .resx files, but if you want to design an interface so a user can translate without seeing any code, then I'd do it with LINQ to XML. I can show you if u need examples but answer first.

Upvotes: 0

Related Questions