Localization and jQuery / JavaScript

I am working on various language packs for my web application. Some of the results are generated by JavaScript / JQuery, and I cannot use .aspx.resx resource files in JavaScript. What parameters do I have to localize the output generated by the client?

Thank you

+6
javascript jquery ajax localization
source share
1 answer

The most common way I've seen is with different .js language files stored in the lang/ or locale/ folder in the project, using only the file for the current language with the <script> .

If you want to manage your languages ​​in one central server location, I think that it is really best for you to output your translations from ASP as a JavaScript file. I do not know ASP, but it is quite possible to do this - just remember to send the header Content-type: text/javascript .

Associated, oriented to PHP, but really doesn't matter: this question . Check out the translation plugins listed there, they can save you extra work.

+5
source share

All Articles