RickStrahl / Westwind.Globalization

Database driven resource localization for .NET applications
544 stars 135 forks source link

Howto include the resource editor in a ASP.NET 5 project #46

Closed Anderman closed 8 years ago

Anderman commented 8 years ago

I tried the install Westwind.Globalization.Web and Westwind.Globalization.

The Westwind.Globalization. seems to be working fine. But I can't get the resource editor working

image

RickStrahl commented 8 years ago

Can you check your browsers dev tools and see if the URLs for the API calls are returning data? Are those working? Are scripts loading? It looks to me like the page is failing to load outright as things are not getting loaded at all or there's some error on startup.

Are you starting from a fresh project? How did you install?

Anderman commented 8 years ago

I sees the problem this file return a 404.

http://localhost:30020/JavaScriptResourceHandler.axd?ResourceSet=LocalizationForm&LocaleId=auto&VarName=resources&ResourceType=resdb&ResourceMode=1

I think some kind of wrapper is needed for support on asp.net.5 beta 8. Because the website runs under kestrel.

ihanesman commented 8 years ago

I had the same isue i coudn't fix it but as a workarround you can edit the LocalizationAdmin\Index.html file.

Just delete "&LocaleId=auto" part from the following line calling the script

"../JavaScriptResourceHandler.axd?ResourceSet=LocalizationForm&LocaleId=auto&VarName=resources&ResourceType=resdb&ResourceMode=1""

RickStrahl commented 8 years ago

@Anderman Sorry I misunderstood the question. ASP.NET 5 is not supported. There are going to be a number of problems due to the reliance of configuration. I will eventually look at porting this over to ASP.NET 5, but it's still too unstable at the moment to go down that path. At this point it looks RC2 is the earliest I'll look at this.

Anderman commented 8 years ago

@RickStrahl thx, Localization does not depend any more only on resx files. Also the annotation will work without specify a resource manager. I created a simple JSON resource manager