Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: Allow External Resource Localization [27968]

$
0
0
I would like to provide my own resource string localization for languages not included in the ACT. I have put in a pull request that allows developers to insert their own translations. Can someone please provide feedback?
Comments: Thank you for your cooperation, johnzered. You have found the problem in the custom localization implementation. In the latest version of the AJAX Control Toolkit, all scripts are rendered with the Constants.JsPostfix suffix by default. This value is set to ".js". But, files that end with ".js" are not considered to be debug versions in terms of AJAX Control Toolkit. We assume that a debug version ends with ".debug.js", while a release version ends with ".js". You can easily check it by installing the [AjaxControlToolkit.StaticResources](https://www.nuget.org/packages/AjaxControlToolkit.StaticResources)  NuGet package. We have several options to overcome this issue: 1. Return minified versions of localization scripts by default. To get a debug (.js) version, you need to perform extra steps like registering your localization scripts with the ScriptManager.ScriptResourceMapping.AddDefinition() method, which will choose an appropriate file version based on your application settings. 2. Return a release (.min.js) version for [Release mode defined in Web.config](http://stackoverflow.com/questions/6193010/how-to-determine-if-compilation-debug-true-in-web-config)  and debug (.js) for the Debug mode. 3. Embed both versions of a localization file into an assembly and choose the right version explicitly. This will add a new parameter to the Localization.AddLocale() method.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>