Is it ok to reuse Prism object when loading multiple languages?
See original GitHub issueHey
I noticed that if I do:
loadLanguages(["javascript"]);
and then later loadLanguages(["markup", "javascript"]);
Then the second one won’t parse the javascript. However if ["markup", "javascript"]
is loaded first it works correctly.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
PRISM - Reuse of Views With Child Regions - Can It Be Done?
1 Answer 1 · Take a look at my answer here, to see how child views can get the locally scoped RegionManager (very...
Read more >Reusable Object or Components | Blue Prism Product
RE: Reusable Object or Components If you haven't already, definitely it out as objects uploaded there will be checked by the Blue Prism...
Read more >Composing the User Interface Using the Prism Library for WPF
The root object in a composite application is known as the shell. The shell acts as a master page for the application. The...
Read more >Processing multi language data using Flat File - IBM
The object structures, as designed, can accept only one language at a time. So, for example, you could import English characters using EN...
Read more >Overcoming challenges with multilingual content reuse
Because they are designed to stand alone, topics can be reused identically across multiple content types. When designed for maximum reuse, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Wow, nice catch.
If we wanted to still avoid said second parameter, we’d have to resolve them in the
loadLanguages
function, e.g. when we do this:We’d have to reload
javascript
after we’ve loadedmarkup
the second time.Is that “optional dependency” made explicit anywhere? We could add optional dependencies to
components.js
, and reload them conditionally based on whether they’ve been loaded already or not.It’s not ideal, from an implementation perspective, but I’d much rather pull that complexity into Prism rather than expecting users to understand whether or not they should be invalidating the cache. Understanding whether to do so requires users to understand Prism’s internals, which I’d like to avoid even at the expense of making
loadLanguages
more complex.Basic idea is this:
Would make a Good First Issue™.