dev | 2020-10-09T03:54:39.000Z

Using VS Code to Internationalize Content

Hellonext, Inc.

Hellonext Team

Internationalization is an important aspect of building products for the world. This allows you to open up your product to users across the world. Though in the past, you would have to work with a human translator to help international users understand your product, machine translation is here to save us in the 21st century!

Machine Translation

Machine translation tools are software that can accurately translate a text without any human intervention. Probably, you would've tried a machine translation tool, such as Google Translate, at least once.

Machine translation is frequently utilized for the translation of huge amounts of data that could not have been translated the normal traditional way. The output quality might vary considerably though and is usually calculated by the manual effort required to post-edit the text. However, machine translation systems can be "trained" to give higher-quality output.

Internationalization Files

Files for translation are usually key value pairs. Each file is generally meant only to have content of one language. Multiple language support used for internationalization requires multiple files with the same key, but the value translated to the corresponding language.

Let's open these files in VS Code and use a Google Translate extension to convert text.

VS Code Google Translate

Open VS Code and go to the sidebar on the left. The last option will be extensions. Click on that and search for "VS Code Google Translate", click to install.

My Preferred Language Settings

Need to translate into a specific language in seconds? Try run Command 'Set Preferred Language' or Set it in VS Code extension settings. However, this means that you will not get an option to choose the language to translate into. This is useful for quick fixes.

Prominent Shortcut Keys

  • Select space + ' from first sentence
  • Hold control + D to select till last line
  • Press shift + Alt + I (i) to select till end to sentence
  • Press shift + Alt + T to translate

Keep in mind, first you have to select your preferred language in settings and then use these above shortcut keys to translate your code to another language.

There are many translation software available in VS code, which translates your code in various languages. But, "VS Code Google Translate" works better and is easier to translate text.

I hope these tips and short ways will help you to make your translation process very neat and less time consuming.

Last updated: June 3rd, 2023 at 4:46:29 PM GMT+0

Hellonext Blogpost Author Profile

Hellonext Team

Hellonext is a user feedback tool and this article was written by many people at Hellonext. Hellonext helps prioritize product roadmap based on user-input.