Rails I18n

June 22, 2026 ยท View on GitHub

CI

VS Code extension for Rails I18n with intelligent code completion, hover information, inline annotations, and navigation features.

Features

Code Completion

Intelligent auto-completion for both translate and localize methods:

translate

localize

Hover Information

Multi-language translation preview on hover. Shows translations for all configured languages in priority order:

hover

Inline Annotations

Translation text displayed inline with I18n keys for better code readability:

annotation

Go to Definition

Navigate directly to translation definitions in locale files:

Goto

Quick Fix

Fixes lazy I18n keys (e.g. converts lazy keys to full keys):

quickfix

Configuration

Configure the extension through VS Code settings:

SettingDescriptionDefault
railsI18n.translateMethodsI18n translate methods["I18n.translate", "I18n.t", "t"]
railsI18n.localizeMethodsI18n localize methods["I18n.localize", "I18n.l", "l"]
railsI18n.localeFilePatternLocale file glob pattern"config/locales/**/*.yml"
railsI18n.priorityOfLocalesPriority order for languages["en"]
railsI18n.languagesEnableHoverProviderLanguages for hover support["ruby", "erb", "haml", "slim"]
railsI18n.annotationsEnable inline annotationstrue
railsI18n.annotationInPlaceShow translation text inlinetrue
railsI18n.annotationMaxLengthMax annotation text length40

Commands

Access these commands via Command Palette (Cmd+Shift+P):

  • Rails I18n: Reload locale files - Refresh translation files
  • Rails I18n: Go to Translation - Browse and navigate to translations

Getting Started

  1. Install the extension
  2. Open a Rails project with config/locales/*.yml files
  3. Start editing Ruby, ERB, HAML, or Slim files
  4. Enjoy intelligent I18n support!