coderifous / jquery-localize

a jQuery plugin that makes it easy to internationalize your web site.
465 stars 142 forks source link

File extension as an option to the plugin #16

Closed yohanb closed 12 years ago

yohanb commented 12 years ago

Hi, I've recently had an issue regarding the *.json file extension used for the localization files. My web application (SharePoint 2010) hosting your plugin has an http handler defined for this extension and interferes with the plugin... hence, it doesn't work. I've had no other choice but to recode your plugin to use an optional fileExtension option parameter: ... loadLanguage = function (pkg, lang, level) { var file, fileExt = ".json"; if (options.fileExtension) { fileExt = options.fileExtension; } ...

It works fine when I use *.js file extensions. Hopefully, you can include this in your next release! ;) Thanks,

Yohan