Replies: 1 comment 4 replies
-
Have decided to use react-intl instead for the time being. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
useMessageFormatter
is deprecated in favour ofuseLocalizedStringFormatter
. However, there isn't any example on how to useuseLocalizedStringFormatter
with variables specifically. From what I understand from this PR, the messages are pre-compiled at build time which returns a string function with template literal (possibly using@internationalized/string-compiler
) that probably gets eval'd at some point, replacing the Record values with a function that supplies the variables to the template literal.But I am completely clueless on how to go about triggering this during build.
Or should I keep using
useMessageFormatter
until this is officially released?I really don't wish to include another Internationalization library and instead re-use the same Internationalization modules that React Aria is using under the hood.
Any guidance/help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions