1.0.12
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>