Recently, I have been enhancing my ASP.NET project by incorporating more JavaScript and AJAX functionality. In the process, I have adjusted parts of my HTML to be generated using JavaScript. However, this modification has made it challenging for me to access the values stored in my local resource files.
In my project's structure, each page or user control has its own local resources and corresponding .js files.
I am seeking a straightforward and elegant solution that would allow me to utilize these local resources in JavaScript seamlessly. Ideally, I envision a method that can take a file like myfile.js, parse it based on the current language settings, and generate an output such as myfile.en.js
UPDATE
Here is how I envision the process:
<script src="../message.js"></script>
function showMessage(){
alert(GetLocalResource("AlertMessage"));
}