In the Dojo Toolkit, the locale (language) has to be defined in the configuration used at loading time.
E.g.
<script data-dojo-config="async: 1, isDebug: 1, locale: 'es'" src="dojo/dojo.js"></script>
I want to specify the locale by an URL-Parameter like this:
../myapp/index.html?lang=es
I use the boilerplate for Dojo: Dojo Boilerplate
One idea was to load the dojo.js this way:
<script data-dojo-config="async: 1, isDebug: 1, locale: function(){//Code returning the value of the language URL-Parameter}" src="dojo/dojo.js"></script>
But this is not working.
Thank you!
PS: A solution is presented in Custom language variants. But this works only, if you have only one URL-Parameter.