Skip to main content
  • Log in
  • Manage Cookies
Eclipse Foundation
Download
  • Projects
  • Working Groups
  • Members
  • Community
    • Marketplace
    • Events
    • Planet Eclipse
    • Newsletter
    • Videos
    • Blogs
  • Participate
    • Report a Bug
    • Forums
    • Mailing Lists
    • Wiki
    • IRC
    • Research
  • Eclipse IDE
    • Download
    • Learn More
    • Documentation
    • Getting Started / Support
    • How to Contribute
    • IDE and Tools
    • Newcomer Forum
  • More
      • Community

      • Marketplace
      • Events
      • Planet Eclipse
      • Newsletter
      • Videos
      • Blogs
      • Participate

      • Report a Bug
      • Forums
      • Mailing Lists
      • Wiki
      • IRC
      • Research
      • Eclipse IDE

      • Download
      • Learn More
      • Documentation
      • Getting Started / Support
      • How to Contribute
      • IDE and Tools
      • Newcomer Forum
  1. Home
  2. Blogs
  3. Brian King's blog
  4. Internationalization in Eclipse Theia

Internationalization in Eclipse Theia

Thursday, December 16, 2021 - 07:12 by Brian King

This post was written by Mark Sujew, Software Engineer at TypeFox

What?

Internationalization (i18n) aims to provide the necessary infrastructure in an application to translate it into different languages/locales. It has been a frequently requested feature for Theia, especially considering that most modern software supports different locales in one way or another.

Why?

Even though some attempts by contributors have been made in the past, as of mid 2021 still Theia had no support for different locales. Arduino has addressed this with the all new Arduino IDE based on Theia. Having supported Arduino previously with their IDE, they tasked TypeFox with contributing this feature to Theia.

Implementation Positives and Challenges

Of course, the main technical inspiration for this feature has been VSCode’s i18n implementation. In short: Inside of VSCode, every user-facing string is translated using a ‘localize’ function call that accepts a key and the English default value. A special build process reads these function calls and extracts every key and default value into a JSON file. These files are then translated, and each placed inside of a dedicated VSCode extension, dubbed as a “Language Pack”.

To keep the maintenance effort for Theia as low as possible, the i18n feature supports VSCode’s language packs to localize Theia. The main challenge here was correctly identifying the keys used in VSCode and using them to translate Theia. Luckily, after going through the process of finding them all, around 85% of Theia was already translated by simply installing a VSCode language pack.

Localizing the monaco-editor and the extension host were also challenges. The former uses an index based approach for localization instead of using string keys, while the latter uses the ‘vscode-nls’ package, whose inner workings are only sparsely documented, requiring some reverse-engineering.

What’s Next?

With Theia version 1.19, most of the framework is translated using language packs, while strings that are custom to Theia are still only available in English. Going into the next months, we plan to integrate a translation pipeline into Theia’s development process and thereby localize Theia into the most commonly used languages.

You can try it out by opening Theia in Gitpod or cloning and compiling it yourself. After installing a language pack of your choice by searching for the language in the extensions tab and downloading it from the Open-VSX registry (see Chinese or French), run the Configure Display Language command and select your desired language. Theia will automatically reload itself and you’ll be presented with a translated user interface.

Theia in Chinese

Theia with a partial Chinese locale

How to Get Involved?

As always, feedback and questions regarding Theia features are appreciated. The easiest way to do that is by filing a feature request issue or creating a Q&A discussion, respectively on GitHub. Be aware that text that is custom to Theia is not yet translated. This will be addressed in the following months.

Tags: 
internationalization
Theia
locales
CloudDevTools
Source: 
https://ecdtools.eclipse.org/resources/blogs/2021-12-16-theia-i18n/
  • Brian King's blog

Eclipse Foundation Blogs

  • Wayne Beaton (817 posts)
  • Mike Milinkovich (311 posts)
  • Ivar Grimstad (177 posts)
  • Benjamin Cabé (131 posts)
  • Tanja Obradovic (52 posts)
  • Thabang Mashologu (37 posts)
  • Brian King (19 posts)
  • Paul Buck (19 posts)
  • Frédéric Desbiens (18 posts)
  • Christopher Guindon (15 posts)
  • Gael Blondelle (13 posts)
  • Hailley Seed (10 posts)
  • Denis Roy (9 posts)
  • Mikaël Barbero (9 posts)
  • Hudson Kelly (8 posts)
  • John Kellerman (7 posts)
  • Shanda Giacomoni (3 posts)
  • Michael Plagge (3 posts)
  • Shabnam Mayel (3 posts)
  • Jacob Harris (2 posts)
  • Paul White (1 posts)
  • Stephanie Swart (1 posts)
  • Clark Roundy (1 posts)
  • Sharon Corbett (1 posts)

Recent blog posts

  • The Edge of Things: A Name That Means a Lot of Things
  • Eclipse Cloud DevTools Contributor Award: Internationalization for Eclipse Theia
  • Hashtag Jakarta EE #124
  • GeeCON 2022
  • Security Leadership at the Eclipse Foundation
  • Community Awards are Back
  • Back to Ludwigsburg: Q&A with EclipseCon 2022 Program Committee Chair
  • Eclipse Cloud DevTools Digest - April, 2022
  • Hashtag Jakarta EE #123
  • Jfokus 2022
More

Eclipse Foundation

  • About Us
  • Contact Us
  • Donate
  • Members
  • Governance
  • Code of Conduct
  • Logo and Artwork
  • Board of Directors

Legal

  • Privacy Policy
  • Terms of Use
  • Copyright Agent
  • Eclipse Public License
  • Legal Resources

Useful Links

  • Report a Bug
  • Documentation
  • How to Contribute
  • Mailing Lists
  • Forums
  • Marketplace

Other

  • IDE and Tools
  • Projects
  • Working Groups
  • Research@Eclipse
  • Report a Vulnerability
  • Service Status

Copyright © Eclipse Foundation. All Rights Reserved.

Back to the top