Enterprise: Locale: Allow default locale loading to be disabled

Created on 9 Aug 2019  路  5Comments  路  Source: infor-design/enterprise

Describe the bug

Angular application provide their own mechanisms for loading and initialising localisations, often using the APP_INITIALIZER approach. However, the Locale object in the EP controls automatically loads the en_US.js script from the default location before Angular has had a chance to initialise their location or augment the translations.

To Reproduce

You can see this by running enterprise-ep demo applications from the angular-8 branch. this often (but not always) displays an error loading en_US.js as Soho.Locale.culturesPath has not yet been set.

Expected behavior

Being able to disable the "automatic" loading of the default locale from the route of the application would remove the error, and allow the standard angular locale initialiser to complete.

Version

angular enterprise-ng 5.5-beta

Screenshots

Platform
All

Additional context

[2] high type

All 5 comments

Need this for NG 8... So will try and address this somehow.

Could we turn off the initialisation like this:

<script>
   window['SohoConfig'] = { renderLoop: { noAutoStart: true }, Locale: { initialization: false } };
</script>

I could do that but i think this code is not needed so checking that first

Even better! :-)

QA passed. Working well in all Browser, OS and devices.
Verified in: http://master-enterprise.demo.design.infor.com/components/datepicker/example-index.html?locale=de-DE

Was this page helpful?
0 / 5 - 0 ratings