Replies: 2 comments
-
Hi 👋
Mint generates code for running in the browser only it does not run in Node.js, also mint doesn't support pre-rendering yet.
I'm not sure what you are referring to, you can interface with JavaScript using the methods described here https://www.mint-lang.com/guide/reference/javascript-interop. In your case you probably need to compile your library into a single JS file which you will be able to use in a Mint application. |
Beta Was this translation helpful? Give feedback.
-
Internationalization is a beast in itself, and as I see it Mint is still missing some key features to appropriately deal with that (Macros should solve this, I guess). In my case, I've opted to use good ol' YAML to write localization files, and wrote a Ruby script to load the files and convert the values to Mint code, defining an This has the disadvantage of not knowing whether the code generated by ruby will work until I run it on mint, but on the other side, as soon as I run mint it will complain if any of the languages is missing even one field, since they won't match the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I've not tried using Mint yet, but I find it interesting. The problem is, as I understand, the Mint compiler generates JavaScript code for front-end application, one that runs in Node.js (pre-render) and another that runs in the web browser, or otherwise I'm wrong. I've used a frameworks (Sapper) that facilitate creating SPAs, but have had issues with asynchronous use of localization resources (imagine, multiple users rendering different languages at the same time).
I've a localization library (link), which does not support collation, currency or date-time formatting (I'm waiting for ECMAScript Temporal proposal to be finished), but it does the general work. I think it'd be nice to integrate that in Mint. If that requires the programmer to integrate it, then the same issue would occur as when I was trying to use Sapper (SPA framework for Svelte).
Beta Was this translation helpful? Give feedback.
All reactions