turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 156 forks source link

Content of .js files not translated #270

Closed sandrulini closed 8 years ago

sandrulini commented 8 years ago

if I put a nugget in javascript function inside cshtml it works well, but nuggets inside .js files are not translated.

kblok commented 8 years ago

@sandrulini the problem is that IIS treats javascript files as static files, because they are, in fact, static files. so those files are not being processed by ASP.NET ergo, no translation is being perform.

I wrote a file translator which generate /en /es /foo /bar folders with translated javascripts so then you add the file you need in the website

turquoiseowl commented 8 years ago

i18n supports javascript okay although static file compression needs to be disabled. See:

https://github.com/turquoiseowl/i18n#static-file-compression-and-i18n

sandrulini commented 8 years ago

Ok, understood! thanks