The Interledger Community 🌱

Cover image for Internationalization for the Community?

Posted on

Internationalization for the Community?

Hi folks.

Just wanting to share a side project of mine on internationalization that I made to make the community more inclusive to non-English speakers. I'm sincerely hope this project could benefit this community and GftW going forward - for now, though, it is only a MVP product that still has a long way to go into production.

You can see the demo here:

(Click the globe icon to select language of your choice - auto target detection based on your country will be supported in the future)

What is this project about?

Have you ever watch on YouTube app some videos made by a foreign creators, and most of the comments were not in language you understand? Usually you'll see a text Translate to XX at the end of those comments that lets you read those comments in language you prefer.

This project is a JavaScript widget planned to be distributed as Web Component. After setting up the backend to connect with translation engine, anyone can implement the same translation widget that translate a body of text. This can be an entire post or individual comment. The best part is, since it is Web Component, you only need to add a few lines of code to your website's codebase - the translation backend will run as microservice that run parallel to your website's backend.

But why would you do this when Chrome already has web page translation feature for free?

Well, for a few reasons:

1) The said free translation feature might not available for all browsers
2) Browser's built-in translation goes one-way from one language to another, and will take entire text in the page into account - which is not appealing if we want to build a website with diverse people with many different languages in it
3) Browser's built-in translation UX focus on translating foreign websites. So the experience of translating other languages in a website that designed for a native one might not smooth enough that in worst case people will avoid posts made in different language because the inconvenience.
4) In case of free translation sucks, there's nothing we can do about it

Some of the improvements that are available in my project:

1) Have control over UI/UX of the translation widget to suit our needs
2) Can support other translation engine other than basic Google Translate machine. For example, the demo site I have is translating using ChatGPT - GPT 3.5 to be exact because I still have no access to the new GPT 4 model.
3) Supports broader countries with ChatGPT engine than Google Translate API. Just look at those flags!
4) Using Cloudflare Workers as a backend, which comes with generous free-tier usage and excellent edge caching for blazing fast performance gain.
5) Content-based hash caching - ensure that the same body of text in a certain language will be only translated in an expensive or slow cloud data center once, and serve the stored translated result from edge caching nearest to users.
6) The translation engines still can be tweaked and improved with ChatGPT Plugins or custom training on GCP Translate in the future.


Like I said before, there's still many works to do before the widget can go into production. For example, the backend is not ready for Google Translate API because Google takes language codes as parameter as supposed to country ISO codes that are being provided by Cloudflare's backend, so I have to manually mapping each of the countries to their language codes supported by Google API. While ChatGPT provides more broad language support than Google and alternative translation result, the translation performance for non-cached content is quite slow even when we are using GPT 3.5 Turbo which supposed to be faster than other new models. There are also quite a lot of client-side issues that are still need to be addressed before other websites can adopt the project into their websites.

As the end goal, I'm hoping that this will be good enough for Forem and Web Monetization community to consider to add to the community forum codebase so we can start experimenting with non-English posts and grant reports. This way we can start seeing more diverse community members from non-English background start contributing their ideas. After all, if we consider about 15% of world population that speaks English, then currently, 85% of the humanity is out of reach for this community and Grant for the Web opportunities.

What do you think? Share your thought on i18n topic for the community in the comment section below!

Latest comments (7)

radhyr profile image

Thanks for the kind words @augustcars

andresgavin profile image
Andres Gavin • Edited

Once the backend is set up to connect with a translation engine, the widget allows users to translate a body of text, such as an entire post or individual comments, into their preferred language. This can be beneficial for websites that have diverse user bases with different language preferences. By running the translation backend as a microservice parallel to the touchcric live website's backend, the widget offers a seamless translation experience without disrupting the website's performance or functionality.

radhyr profile image
Radhy • Edited

Yes, you are correct. Going further, the backend can also provided by third-party and maybe can integrate WM or Interledger for donation to offset translation engine cost. This way, barrier to adopt the widget can even be lowered on top of benefits of providing multilingual function.

radhyr profile image

Will do! Thanks for the kind words Boone Kylan πŸ™

vineel profile image
Vineel R. Pindi

Hi @radhyr , very interesting and needed project! Thank you for putting it together and sharing with the community. I'll check with the team on how best we can integrate some or parts of this. I'll get back to you if I have any questions.

radhyr profile image

Glad to hear that you like it! I'll be here when you have some questions in mindπŸ˜ƒ