# css-javascript-toolbox/8.0.3/framework/js/wordpress/script-localizer/script-localizer.js

CSS &amp; JavaScript Toolbox, version 8.0.3. 43 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/8.0.3/code/framework/js/wordpress/script-localizer/script-localizer.js
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/8.0.3/raw/framework/js/wordpress/script-localizer/script-localizer.js
- Modified: 2014-05-06T16:47:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/css-javascript-toolbox/8.0.3/code/framework/js/wordpress/script-localizer/script-localizer.js#L10-L20`.

```javascript
/**
* 
*/

var CJTWPScriptLocalizer;

/**
* 
*/
(function($) {
	
	/**
	* put your comment there...
	* 
	*/
	CJTWPScriptLocalizer = function(scripts) {
		
		/**
		* 
		*/
		this.localize = function() {
			var localization = '';
			// For every script file get JS localization array.
			$.each(scripts, $.proxy(
				function(index, script) {
					// Is the Script localized?
					if (script.extra.data != undefined) {
						// Merge all localization vars into single string!
						localization += script.extra.data + ";\n";
					}
				}, this)
			);
			// Add single script tag for all the localization variables.
			var scriptTag = document.createElement('script');
			scriptTag.type = "text/javascript";
			scriptTag.innerHTML = localization;
			// Evaluation!
			document.getElementsByTagName('head')[0].appendChild(scriptTag);
		}
		
	} // End class.
	
})(jQuery);
```
