logoalt Hacker News

primitivesuave10/01/20241 replyview on HN

This is a great idea. I have even hit this pain point when developing a healthcare app for hospitals that was primarily used in the United States. There are certain communities, even just within California, where it is common to have patients who only understand Spanish, Mandarin, or Japanese.

Any plans to extend this to iOS/Android development in the future? I assume it would already be easy to integrate this into React Native.

Also, is there a way for me to provide explicit additional context to the `t` function for the translation? Essentially a string that is appended to the LLM input for translation. For example, in Japanese there is often a significant difference between formal and informal language, and it is common to add post-positional particles such as や, が, and の to make titles and labels sound more natural. I see you have addressed many other special cases around numbers/dates/etc, so certain flags like formal/informal, regional dialect, etc may be valuable future additions.

Overall looks really nice and I look forward to trying this the next time the need arises.


Replies

jthompson400410/01/2024

Right now we actually do have React Native support, it is now in our docs! As for adding manual context, we're planning on adding that, but we don't want people to go overboard with adding additional context where it's not needed. We want to have suggestions for if we need additional context beyond what we get from the tree traversal. Also, in terms of tone/regional dialect, that's something we're adding into the dashboard so that all translations will have that info passed to the LLM to maintain consistency throughout the app!