Answered by:
How to change value in Resource.resx on runtime?

Question
-
User2107117908 posted
Hello Every one.
I need any help to solve this problem.
I am make website and publish it, i am used different language by Resource.resx and Resource.Ar.resx.
when publish website i see resources files convert to .dll
App_GlobalResources.dll
App_GlobalResources.compiled
AR/App_GlobalResources.resources.dll
i want to make page in administrator to can change value for any key in resources.
but i don't have any idea . how i can search key by value.
then i want to put textbox to change value.
ex:
Key : MSG Value : Message.
i want to change 'Message' Value to 'welcome to visit us' throught website is running.
With best Regards
DaIlYwAkE
Tuesday, March 16, 2010 10:27 PM
Answers
-
User2107117908 posted
thank you for replay, but I am not ask about set culture , i am ask to edit value in resources file at runtime.
look at the photo i want to make web page as this.
I find solution here http://www.codeproject.com/KB/cs/Editing_a_ResourceFile.aspx?msg=3406807
i
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, March 17, 2010 6:07 AM
All replies
-
User2039959148 posted
You shoul set the culture dynamically like this
public void Page_Load()
{ // Display the Current Culture
Response.Write("Current Culture is " + Thread.CurrentThread.CurrentCulture.EnglishName + "<br>");
// Modify the Current Culture
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
Response.Write("Changing Culture to " + Thread.CurrentThread.CurrentCulture.EnglishName + "<br>");
}Wednesday, March 17, 2010 12:50 AM -
User-1636183269 posted
I will prefer to set your respective culture in InitializeCulture() section, refer below link I have tried same and created sample.
Wednesday, March 17, 2010 1:17 AM -
User2107117908 posted
thank you for replay, but I am not ask about set culture , i am ask to edit value in resources file at runtime.
look at the photo i want to make web page as this.
I find solution here http://www.codeproject.com/KB/cs/Editing_a_ResourceFile.aspx?msg=3406807
i
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, March 17, 2010 6:07 AM