Fork me on GitHub
#fulcro
<
2022-05-11
>
Lycheese13:05:11

What is the currently recommended way for handling internationalization in fulcro? Specifically making text translations easy to bundle.

tony.kay15:05:56

Still Fulcro i18n lib

tony.kay15:05:45

It allows you to write strings in code in your native lang, then extract them to gettext format. From there you can use nice tools like poedit to translate. Then you add those files to your project and they can serve out to client on alt lang selection.

tony.kay15:05:20

RAD is designed and written to use that, and I recommend all fulcro-specific libs target that.

tony.kay15:05:51

someday soon I’ll get back to polishing that lib, but it’s usable as-is, and is open to contributions

tony.kay15:05:28

The RAD support for date/time (which you can use even if you don’t use other things in RAD) and the numerics (bigdec) normalization is also quite useful to throw in. I hand-wrote a compatibility layer for date/time formatting in RAD because the js-joda support was lacking. It’s a CLJC implementation that uses java’s support in CLJ, but uses the brower’s Intl support to format dates in CLJS. It’s not perfect since the JVM and browsers don’t have perfect agreement, but it’s pretty good. Pretty much the rest of date/time I lean on CLJC java-time, since that works CLJC perfectly except for the date formatting.

Pragyan Tripathi16:05:14

Is there a way I can expose Fulcro components to be used by a react application?

tony.kay17:05:58

That is a good section to read, but you might consider using hooks and use-component as the mechanism now instead of the alt renderer

Pragyan Tripathi17:05:36

Cool… this it incredibly useful… thanks 🙂

Jakub Holý (HolyJak)13:05:10

@U0CKQ19AQ not sure why but your link did not work. The browser tells me it should be https://book.fulcrologic.com/#HooksUseComponent

tony.kay16:05:02

I pushed an update to the book…changed the anchor

❤️ 1