Live data from Hacker News

Show HN: Localize React apps without rewriting code

github.com

21–30 of 75 posts

Re: Show HN: Localize React apps without rewriting code

#21
I thought this was awesome until you included an LLM into the mix.

I hate the current react i18n solutions, and the fact that they only work in runtime, as opposed to Angular’s build time i18n solution.

If your compiler could plugin to existing localization workflows in large organizations to at would be great (ie: extraction, load from configuration).

Re: Show HN: Localize React apps without rewriting code

#23

I thought this was awesome until you included an LLM into the mix. I hate the current react i18n solutions, and the fact that they only work in runtime, as opposed to Angular’s build time i18n solution. If your compiler could plugin to existing localization workflows in large organizations to at would be great (ie: extraction, load from configuration).

Thanks for the perspective!

We support larger org workflows with the Lingo.dev Engine product, but that's not the point: Lingo.dev Compiler is unrelated to that, 100% free and open source.

We started with a thought - what if i18n is actually meant to be build-time, LLM-powered, and that's enough for it to be precise? Not today, but in the future, it feels like this type of solution could elegantly solve i18n at scale, in software, as opposed to the existing sophisticated workflows.

WDYT?

Re: Show HN: Localize React apps without rewriting code

#25

This is great. I have worked at many companies and dealt with i18n many times. It was often half baked and frustrating. Not to mention the annoyance of needing to introduce localization to a project that had none before. I often pondered creating a util to improve this space, but looks like you've done the work already. And using LLMs, injecting into the builds, I think this is a great choice for a problem that can b…

Genuinely excited to read comments like yours. We started the project scratching our own itch, and are touched it resonated!

It will remain 100% free and open-source. We're already dogfooding it on our website and app, so if you'd like to join and contribute at some point, we'd be very happy!

Re: Show HN: Localize React apps without rewriting code

#26
post #16
post #12

How do you deal with specific wording that needs to be used in certain languages (often required for legal topics) or specific brand-related messages that need to be in place without any modifications? Does a developer still have the ability to manually translate certain strings?

Hey lukol, that's an exciting problem to solve. The best solution right now is prompt engineering: turns out, AI can be tuned to provide top quality results with the correct system prompt/few shot setup, and custom prompts can be provided in the compiler config. Longer term, I want this to never be an issue, and I feel we'll get there together with the help from the open source community!

One simple idea* would be an option to exclude certain React elements from auto translation. That would allow users to handle these specific cases “manually” while still reaping the benefits of the automated system the other 99% of the time.

* worth exactly what you paid for it ;)

Re: Show HN: Localize React apps without rewriting code

#27
post #19

I'm trying to understand if it works with an Electron (or Tauri) app on desktop? Cannot find any mention on the website. And how it works with apps that are not bases on React Router or anything similar, so it cannot learn all the possible screens.

With the community support we hope to support more platforms soon vs now, but I can confidently say that adding support for techs stacks using one of the following:

Vite Rollup webpack esbuild Rspack Rolldown Farm

should be reasonably straightforward, and we expect pull requests adding other setups soon.

That's a great question!

Re: Show HN: Localize React apps without rewriting code

#28
post #26
post #16

Earlier quoted context omitted.

Hey lukol, that's an exciting problem to solve. The best solution right now is prompt engineering: turns out, AI can be tuned to provide top quality results with the correct system prompt/few shot setup, and custom prompts can be provided in the compiler config. Longer term, I want this to never be an issue, and I feel we'll get there together with the help from the open source community!

One simple idea* would be an option to exclude certain React elements from auto translation. That would allow users to handle these specific cases “manually” while still reaping the benefits of the automated system the other 99% of the time. * worth exactly what you paid for it ;)

...or having an "override" file that allows manual specification regardless about what the LLM spits out.

Re: Show HN: Localize React apps without rewriting code

#29
post #22

> ``` function WelcomeMessage() { return ( Welcome to our platform ! Get started today. ); } ``` Not the point here, but is there any move yet in React to separating the presentation from the logic[1]? 1 - https://martinfowler.com/eaaDev/SeparatedPresentation.html

I believe tRPC could be a great solution to separate logic, generally speaking. However it also depends on what type of logic - some logic, like state/behaviour of the sidebar/modals will always remain client side.

Re: Show HN: Localize React apps without rewriting code

#30
post #22

> ``` function WelcomeMessage() { return ( Welcome to our platform ! Get started today. ); } ``` Not the point here, but is there any move yet in React to separating the presentation from the logic[1]? 1 - https://martinfowler.com/eaaDev/SeparatedPresentation.html

I wouldn't expect there to be any.

Sometimes your presentation varies depending on the data, in ways that are ultimately Turing-complete. Any domain-specific-language is eventually going to grow to incorporate some kind of logic.

React seems to have found a sweet spot for that with JSX, which presents as if it's mostly HTML with some Javascript mixed in. (In reality, it's actually Javascript with HTML-esque syntactic sugar, but it works very hard to present the illusion.) That means that it's working in two well-understood and widely-supported languages, rather than creating yet another presentation language.

HTML+CSS has deep flaws as a presentation language, but it's also universal. I don't expect React to reinvent that particular wheel.

Post reply on HN