Setting a different lang attribute on a widget seems not work in release mode
Not really sure about this, but my impression is as follows: If you serve a page in a certain language (e.g. 'en' by specifying locale:'en' in data-dojo-config), the web app gets broken if you set a different lang to an included widget with the lang-attribute like so:
Not really sure about this, but my impression is as follows: If you serve a page in a certain language (e.g. 'en' by specifying locale:'en' in data-dojo-config), the web app gets broken if you set a different lang to an included widget with the lang-attribute
In this case, you're configuring Dojo to serve a layer built for only the 'en' locale, therefore no information on variants comes down from the server. That much seems consistent with the spec. For the lang attribute, it seems that an exact match is required and that there's no search for matching locales. Bug or feature, I'm not sure, but a helpful error message would certainly be nice. What's the error message you get?
Re: Setting a different lang attribute on a widget seems not work in release mode
Agreed, it is quite an unusal use case to serve a page in 'en' and set a different language just for one widget with the lang attribute (e.g. 'en-gb'). But in this case, I would expect, that Dojo tries to make an separate require call for the desired language ressource 'en-gb' (not the layer file en-gb!), so that you get in the network panel as loaded files the layer file for en and the original, unbuilt, separate i18n file for en-gb (like in debug mode with an unbuilt app).
Instead Dojo fails with a strang error message somewhere in my custom code. It gives me a "this.Button is undefined error". this.Button is a widget which has been imported by registry.byId on startup of the page-level controller's init function. So the error message has nothing to do with the lang attribute which is set to another widget. It took us quite some hours to figure out, that the reason for the trouble with our release version of our application was the lang attribute on the DateTextBox.
It was a quite uncomfortable situation like the one when our build failed because the build tool cannot handle hidden CVS files, see http://bugs.dojotoolkit.org/ticket/16106. Again it took us ours to figure out the reason for the failure.