Skip to content

1.0.12

Compare
Choose a tag to compare
@stefanprodan stefanprodan released this 31 Oct 11:37
· 261 commits to master since this release
New in RequireJS.NET v1.0.12

RenderRequireJsSetup sets the locale value using Thread.CurrentThread.CurrentCulture, when the thread culture changes, the JS modules can access it using the global variable requireConfig.locale, the RequireJS i18n plugin will read from require.locale

RenderRequireJsSetup emits the following code when CurrentCulture is set to ro-RO:

<script type="text/javascript">
    var requireConfig = {
    locale:'ro',
    pageOptions:{ ... },
    websiteOptions:{ ... }
    };

    var require = {
    locale:'ro',
    baseUrl:'/Scripts',
    paths:{ ... },
    shim:{ ... }
    };
</script>

<script data-main="Controllers/Root/Home/Home-Index" src="/Scripts/require.js">
</script>