Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
By integrating the Intlayer MCP Server to your favourite AI assistant can retrieve all the doc directly from ChatGPT, DeepSeek, Cursor, VSCode, etc.
See MCP Server docThe content of this page was translated using an AI.
See the last version of the original content in EnglishIf you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy doc Markdown to clipboard
Official VS Code Extension
Overview
Intlayer is the official Visual Studio Code extension for Intlayer, designed to improve the developer experience when working with localised content in your projects.
Extension link: https://marketplace.visualstudio.com/items?itemName=Intlayer.intlayer-vs-code-extension
Features
Instant Navigation
Go to Definition Support – Use ⌘ + Click (Mac) or Ctrl + Click (Windows/Linux) on a useIntlayer key to open the corresponding content file instantly.
Seamless Integration – Works effortlessly with react-intlayer and next-intlayer projects.
Multi-language Support – Supports localised content across different languages.
VS Code Integration – Smoothly integrates with VS Code’s navigation and command palette.
Dictionary Management Commands
Manage your content dictionaries directly from VS Code:
- Build Dictionaries – Generate content files based on your project structure.
- Push Dictionaries – Upload the latest dictionary content to your repository.
- Pull Dictionaries – Synchronise the latest dictionary content from your repository to your local environment.
- Fill Dictionaries – Populate dictionaries with content from your project.
- Test Dictionaries – Identify missing or incomplete translations.
Content Declaration Generator
Easily generate structured dictionary files in different formats:
If you are currently working on a component, it will generate the .content.{ts,tsx,js,jsx,mjs,cjs,json} file for you.
Example of component:
Copy the code to the clipboard
const MyComponent = () => { const { myTranslatedContent } = useIntlayer("my-component"); return <span>{myTranslatedContent}</span>;};
Generated file in TypeScript format:
Copy the code to the clipboard
import { t, type Dictionary } from "intlayer";const componentContent = { key: "my-component", content: { myTranslatedContent: t({ en: "Hello World", es: "Hola Mundo", fr: "Bonjour le monde", }), },};export default componentContent;
Available formats:
- TypeScript (.ts)
- ES Module (.esm)
- CommonJS (.cjs)
- JSON (.json)
Intlayer Tab (Activity Bar)
Open the Intlayer tab by clicking the Intlayer icon in the VS Code Activity Bar. It contains two views:
- Search: A live search bar to quickly filter dictionaries and their content. Typing updates the results instantly.
- Dictionaries: A tree view of your environments/projects, dictionary keys, and the files contributing entries. You can:
- Click a file to open it in the editor.
- Use the toolbar to run actions: Build, Pull, Push, Fill, Refresh, Test, and Create Dictionary File.
- Use the context menu for item‑specific actions:
- On a dictionary: Pull or Push
- On a file: Fill Dictionary
- When you switch editors, the tree will reveal the matching file if it belongs to a dictionary.
Installation
You can install Intlayer directly from the VS Code Marketplace:
- Open VS Code.
- Go to the Extensions Marketplace.
- Search for "Intlayer".
- Click Install.
Usage
Quick Navigation
- Open a project using react-intlayer.
Locate a call to useIntlayer(), such as:
tsxCopy codeCopy the code to the clipboard
const content = useIntlayer("app");
- Command-click (⌘+Click on macOS) or Ctrl+Click (on Windows/Linux) on the key (e.g., "app").
- VS Code will automatically open the corresponding dictionary file, e.g., src/app.content.ts.
Managing Content Dictionaries
Intlayer Tab (Activity Bar)
Use the side tab to browse and manage dictionaries:
- Open the Intlayer icon in the Activity Bar.
- In Search, type to filter dictionaries and entries in real time.
- In Dictionaries, browse environments, dictionaries, and files. Use the toolbar for Build, Pull, Push, Fill, Refresh, Test, and Create Dictionary File. Right‑click for context actions (Pull/Push on dictionaries, Fill on files). The current editor file auto‑reveals in the tree when applicable.
Building Dictionaries
Generate all dictionary content files with:
Copy the code to the clipboard
Cmd + Shift + P (macOS) / Ctrl + Shift + P (Windows/Linux)
Search for Build Dictionaries and execute the command.
Pushing Dictionaries
Upload the latest dictionary content:
- Open the Command Palette.
- Search for Push Dictionaries.
- Select the dictionaries to push and confirm.
Pulling Dictionaries
Sync the latest dictionary content:
- Open the Command Palette.
- Search for Pull Dictionaries.
- Choose the dictionaries to pull.
Filling Dictionaries
Fill dictionaries with content from your project:
- Open the Command Palette.
- Search for Fill Dictionaries.
- Run the command to populate dictionaries.
Testing Dictionaries
Validate dictionaries and find missing translations:
- Open the Command Palette.
- Search for Test Dictionaries.
- Review the reported issues and fix as needed.
Doc History
Version | Date | Changes |
---|---|---|
5.5.10 | 2025-06-29 | Init history |