简体   繁体   中英

What's an efficient way to convert localized resources.resx files to javascript files in asp.net MVC?

I have localized resx files that I want to convert to JSON and store in js files (eg en-US.js).

What would be an efficient means of converting the resource files to javascript files at each build?

Create a t4 template to parse it and output your js files. You could do this via a prebuild.

Get Visual Studio to run a T4 Template on every build

I would do this prebuild and then define a bundle to minify and bundle that folder using asp.net 4.5 bundling API or a third party tool like squishit or Minify etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM