Hello,
We are in the process of translating our app.
Default language is English.
Right after login, when the UI detects the user's language (provided by the backend) is not English, we dynamically load an Isomorphic-provided properties file for the translation of the framework items.
We dynamically create a 'script' element and append it to the body like this:
document.body.appendChild(localeScript);
As opposed to what the documentation states, we didn't want to have all the users load all the supported languages when they'll never use it.
Unfortunately, doing it this way, Chrome complains in its console:
Resource interpreted as Script but transferred with MIME type text/plain : "http://localhost:8080/webapp/isomorphic/locales/frameworkMessages_fr_FR.properties"
Is there a best practice for dynamically loading a frameworkMessages file after index.html is loaded ?
Version: 9.1p_2014-07-23/Pro Deployment - 2014-07-23
Thanks !
-C
We are in the process of translating our app.
Default language is English.
Right after login, when the UI detects the user's language (provided by the backend) is not English, we dynamically load an Isomorphic-provided properties file for the translation of the framework items.
We dynamically create a 'script' element and append it to the body like this:
document.body.appendChild(localeScript);
As opposed to what the documentation states, we didn't want to have all the users load all the supported languages when they'll never use it.
Unfortunately, doing it this way, Chrome complains in its console:
Resource interpreted as Script but transferred with MIME type text/plain : "http://localhost:8080/webapp/isomorphic/locales/frameworkMessages_fr_FR.properties"
Is there a best practice for dynamically loading a frameworkMessages file after index.html is loaded ?
Version: 9.1p_2014-07-23/Pro Deployment - 2014-07-23
Thanks !
-C
Comment