New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading languages with requirejs #148
Comments
did you tried with the languages files in I think those one have an AMD wrapper |
Already tried, same error. |
then I need to investigate 😄 which version do you use? have you tried several versions? Thanks |
It doesn't look like there's any existing AMD support, just CommonJS and basic script tag support. |
we use numbro in production in an AMD environment (not the latest numbro though). Support is here |
I did some tests, and loading languages fails when enabling in requirejs config Requirejs documentation doesn't state clearly if it applies to newer IE version too, so I don't really consider it a bug in numbro, i think i can safely disable Anyway, for completeness' sake, here's a jsfiddle to repoduce it. |
Here is a working fiddle. Let's hope you find it useful 😄 |
Numbro languages work fine even without shim, assuming they're required in the proper order. |
That's a bit cheating, but you can always do that |
can we close this? |
Yes, the "cheat" is fine, i'm closing this. |
@rudym87 if you need it lees cheaty, we could introduce a map of imported lnaguages, so that you could have:
or similar |
That can be an interesting solution, it can be used for other checks unrelated to requirejs. |
could you create another issue for it? 😄 |
Done! |
👍 |
How can I load a language file in an AMD environment?
Currently trying to load languages.js or any single language file gives a
No define call for...
error.The text was updated successfully, but these errors were encountered: