Using VS Code to Internationalize Content

Internationalization is an important aspect of building products for the world. At Skcript, accessibility is our number one priority. In this article, I show you how to use VS Code to internationalize project strings. I've shared some tips to make use of VS Code translator effectively with unique shortcut methods that help save you time. Read on!

Karthik Kamalakannan

Karthik Kamalakannan

Using VS Code to Internationalize Content

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: November 21st, 2023 at 6:56:16 PM GMT+0


Get notified about new updates on Product Management, Building SaaS, and more.

Skcript 10th Anniversary

Consultants for ambitious businesses.

Copyright © 2023 Skcript Technologies Pvt. Ltd.