Skip to content
AddHunt
VS Code extensions

Sherlock

VS Code extension for inline i18n translations and linting

Open source

  • Open source
  • Licence: MIT

In short

Sherlock is an i18n extension for Visual Studio Code from the inlang ecosystem that shows translations inline, lets developers edit them from the code and flags missing ones. It is for developers localizing apps who want to stop switching between source files and translation files.

What you get

  • Inline translation annotations with hover details
  • Extract new strings with one click
  • Edit translations from the code
  • Lint warnings for missing translations
  • Monorepo support with a project switcher tab

The details

Sherlock brings localization work into the editor. Translations appear as inline annotations next to the keys that use them, and hovering shows more detail, so there is no need to open resource files to check what a string says in each language. New strings can be extracted into messages with a click, and existing translations can be edited from the code.

Linting and project overview

Lint rules report missing translations and other problems directly in the IDE. A dedicated Sherlock tab gives a quick view of setup errors and makes it easy to switch between several projects in one repository, which suits monorepos. When source text changes, translations from the resource files are refreshed automatically.

Setup

Sherlock is built on inlang, which relies on git, so the project must live in a git repository. Setup means adding a project.inlang/settings.json file with the base locale, the target locales and a storage module such as the JSON plugin, then choosing a syntax matcher for the i18n library in use. Matchers exist for m and t functions and for next-intl, and i18next support is built in. Optional lint rules can be added from the inlang catalogue. The extension requires VS Code 1.84.0 or newer and Node.js 18 or newer, and the source is MIT licensed.

Alternatives to Sherlock

Questions

Which i18n setups does Sherlock work with?

It works through inlang modules and syntax matchers, covering JSON files, i18next, next-intl and m or t function patterns.

Why does Sherlock need a git repository?

The inlang ecosystem it is built on relies on git, so the extension needs a git repository to work.

More like this