Open holtkamp opened 7 years ago
A problem is that the language files as loaded by $.ajax
should be located relative to the HTML page (and not relative to the .js file) that uses the functionality, so using relative URLs will be a no-go... 😞
http://stackoverflow.com/questions/36369082/relative-paths-with-fetch-in-javascript
maybe we can setup browsersync (https://browsersync.io/) for gulp in development phase. so there is no problem with ajax.
@mazipan I don't see how this circumvents the problem?
Suppose I have a webpage, which references to the JavaScript files on CDNJS:
Then the English translation file will be loaded relative to the .html page, so from:
Instead of: https://cdnjs.cloudflare.com/ajax/libs/jquery-date-range-picker/0.14.4/locales/en.json
We might be able to circumvent this by introducing a configuration option basePath
that a user has to point to https://cdnjs.cloudflare.com/ajax/libs/jquery-date-range-picker/0.14.4/
, but I think that is a big disadvantage / not worth it...
Initial approach to separate non-default language files