Closed nicholsts closed 8 years ago
Does your C# code use the same resource set? ResourceSet=Resources?
Yes
On Aug 31, 2016, at 12:55 AM, Pawel Wojciak notifications@github.com<mailto:notifications@github.com> wrote:
Does your C# code use the same resource set? ResourceSet=Resources ?
You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/RickStrahl/Westwind.Globalization/issues/77#issuecomment-243675222, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AP0-lWqfD5z3awF9u40F389GMSkV6E6Gks5qlSV3gaJpZM4JxGL4.
Please disregard this issue. After thorough research (and some frustration), I have realized I was not using the JavaScript aspect of this package correctly.
@nicholsts I am having issues similar to you can you explain why you were getting this issue. I cannot get to resources from db using the javascript handler
Hi @saqibshakil.
Since I had successfully implemented Westwind globalization and was able to access the Localizations table in my database using DbRes.T() in my .cshtml and .cs pages, I thought the JavaScript connection would be a snap. Not the case. After carefully reading and rereading the documentation, I realized my JavaScript declaration
was actually looking for the Resources..resx files located under the Properties folder in my web project, not the Localizations table in the database. So, I use LocalizationAdmin to manage the data in the Localizations table and then export the Resources from the LocalizationAdmin tool in order to update the Resources..resx files in my web project. I then commit the changes to the source repo and publish. The DbRes.T() method hits the cached data on the data server and the localeResources.dbRes() method hits the Resources.*.resx files on the web server.
Hope that helps. :)
I was able to fix that using line to line compare of my web config to the sample application's and was able to fix that issue by moving the Globalization and trust tag above the httphandler tag
On Tue, Oct 18, 2016 at 12:57 AM, nicholsts notifications@github.com wrote:
Hi @saqibshakil https://github.com/saqibshakil.
Since I had successfully implemented Westwind globalization and was able to access the Localizations table in my database using DbRes.T() in my .cshtml and .cs pages, I thought the JavaScript connection would be a snap. Not the case. After carefully reading and rereading the documentation, I realized my JavaScript declaration
was actually looking for the Resources..resx files located under the Properties folder in my web project, not the Localizations table in the database. So, I use LocalizationAdmin to manage the data in the Localizations table and then export the Resources from the LocalizationAdmin tool in order to update the Resources..resx files in my web project. I then commit the changes to the source repo and publish. The DbRes.T() method hits the cached data on the data server and the localeResources.dbRes() method hits the Resources.*.resx files on the web server.
Hope that helps. :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RickStrahl/Westwind.Globalization/issues/77#issuecomment-254315475, or mute the thread https://github.com/notifications/unsubscribe-auth/ADBTVGtXkfb7JFkXOMjMniEaRzLarY9_ks5q09MggaJpZM4JxGL4 .
Regards, Saqib Shakil
In the shared view of my mvc web app, I have the following two lines of code at the bottom of the page. The first line, which is commented out, was working when I originally set it up about a month ago. The second line is what I have been using for some quick testing.
Regardless of my setting the ResourctType flag to resdb or resx, the localeResources variable is being populated with the contents of the resx file under my app's Properties folder.
I am currently using WestWind.Globalization.Web 2.12.1.
Note: I am successfully reading from the Localization table in my database for my Razor and C# code. Only my JavaScript code has stopped working.