Live data from Hacker News

Launch HN: Lang (YC S19) – Internationalization Built for Devs

news.ycombinator.com

1–10 of 48 posts

Launch HN: Lang (YC S19) – Internationalization Built for Devs

#1
Hey HN! We’re Eric, Peter, and Abhi, founders of Lang (https://www.langapi.co). We help developers quickly translate their apps into foreign languages by combining internationalization SDKs with a command-line interface that integrates directly with human translators.

Previously, we all worked on building internationalization and localization tooling for companies. In our experience, companies don’t think about translation until too late, and the tech debt builds up very fast. It’s a nightmare to receive a task that says “translate app into Spanish.” Choosing the right open-source framework, refactoring the entire codebase, and integrating with human translators is a massive effort. As engineers, we wanted to work on features - not putting every string in our codebase into a translations.json file. In our months of internationalization work, we couldn’t find a good all-in-one toolkit. So we built Lang.

Like other internationalization libraries, Lang gives you a tr() function. Wrap your strings with tr(), and we’ll show your users translations that correspond to their language settings at run-time. But how do you actually get the translations? Open-source frameworks like Polyglot.js stop here, but Lang doesn’t. Run “push,” and our command-line tool will parse your code files, find tr() calls, collect newly added strings, and send them to human translators for you. For JavaScript, we use Babel to construct an Abstract Syntax Tree (AST) of your code, and traverse the tree to find tr()’d strings. For a developer, this makes it simple to add/remove/update strings: just run “push” in your terminal. You can track the status of your translations on our dashboard, and when they’re done just run “pull.” We’ll generate a translation file for you, and connect it with our tr() function. You own the file - Lang doesn’t make any network requests for translations at run-time, and your translations always load, even if our service is down.

This works for static strings in the code, but what about dynamic content in the backend or database? We expose a function called liveTr(), which takes a string argument. The first time liveTr() sees an untranslated string, it will make a request to Lang to translate it and return the string in its original language. But the next time, it will fetch the translation on-demand. We’ve shipped liveTr() with built-in caching functionality to reduce the number of network requests. We also have self-hosted solutions for users with high uptime requirements. This is a common in-house feature companies build for internationalization, and we want to make it available to all devs.

Lang currently supports JavaScript and Typescript apps (React, React Native, Vue etc.) with closed betas for Django, Android, and iOS. Give us a try at https://www.langapi.co/signup - machine translations are free, so you can see your app in another language in minutes. If you use human translations, we charge $99 / month for our tooling, and 6-8 cents per word translated. A lot of our work is inspired by open-source, and we want to give back - if you’re building an open-source project or non-profit, ping us at eric@langapi.co. We’ll drop the monthly fee :)

The HN community builds amazing products, and we’re sure there are plenty of people here who have translated their apps - we’d love to hear your experiences in this area and your feedback on how we can improve!

Re: Launch HN: Lang (YC S19) – Internationalization Built for Devs

#2
The Hindi example on your front page is translated in a grammatically incorrect manner.

Instead of saying "Lang me aapka swaagat hai", you've got "me aapka swaagat hai Lang".

It's like saying "Lang Welcome to".

Nice idea though, if you can iron stuff like the above out.

Re: Launch HN: Lang (YC S19) – Internationalization Built for Devs

#3
Congrats on the launch! I can totally see the need for this. What (if anything) would you say has changed in the recent years to make this technologically feasible for the first time? Have you looked into how the latest advances in NLP eg. GPT-2 has the potential to substitute translators entirely?

Re: Launch HN: Lang (YC S19) – Internationalization Built for Devs

#4
post #2

The Hindi example on your front page is translated in a grammatically incorrect manner. Instead of saying "Lang me aapka swaagat hai", you've got "me aapka swaagat hai Lang". It's like saying "Lang Welcome to". Nice idea though, if you can iron stuff like the above out.

Great catch, thank you! We'll update the Hindi example :)

Re: Launch HN: Lang (YC S19) – Internationalization Built for Devs

#5
This is very cool! It took us months to build the equivalent tooling for reddit (except we were using crowd sourced translations instead of machine based ones).

Do your clients do local caching, or is my uptime dependent on your uptime (unless I code in my own caching I suppose)?

Re: Launch HN: Lang (YC S19) – Internationalization Built for Devs

#6
post #3

Congrats on the launch! I can totally see the need for this. What (if anything) would you say has changed in the recent years to make this technologically feasible for the first time? Have you looked into how the latest advances in NLP eg. GPT-2 has the potential to substitute translators entirely?

Thank you for the kind words! Two main reasons for our approach:

1) JavaScript-based apps these days have complex rendering logic that makes the HTML-parser method to find + translate strings unfeasible. Every company we've worked at has needed to extract each string and wrap them with a special `translate` function in their codebase.

2) We make heavy use of the Babel and TypeScript compilers to work with JavaScript ASTs, and there's been huge progress on those recently.

We've thought about NLP, but quality is a huge concern of ours, and we're not quite ready yet to roll that out to companies. If that's something you're interested in, would love to chat, send me an email at HN username + gmail!

Re: Launch HN: Lang (YC S19) – Internationalization Built for Devs

#8
post #5

This is very cool! It took us months to build the equivalent tooling for reddit (except we were using crowd sourced translations instead of machine based ones). Do your clients do local caching, or is my uptime dependent on your uptime (unless I code in my own caching I suppose)?

Great question, and thanks so much for sharing your experience at reddit! For static strings, we create resource files and download them directly into your codebase, so your uptime is totally independent of ours once you deploy your app.

For dynamic strings in the database/generated by users, our servers need to be up to receive + handle the translation request, but that will be cached the next time you try to look the translation up.

Re: Launch HN: Lang (YC S19) – Internationalization Built for Devs

#10
post #7

Couldn't a bad actor abuse liveTr() and call it with a ton of random strings to make me pay to translate a ton of garbage data?

A bad actor could only abuse liveTr() to spend your money if they had access to your API keys, which hopefully should be a secret. In these cases, you'll also be able to report bad strings coming in through your dashboard, and we'll take care of the bad actor and re-fund you immediately!
Post reply on HN