Skip to content

This plugin simplifies the management of manual translations using react i18n extensions.

License

Notifications You must be signed in to change notification settings

FelipeJz/i18n-menu.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

i18n menu

This plugin simplifies the management of manual translations using react i18n extensions. Work in progress. Only tested in next-intl. Heavily inspired by i18n Ally.

Installation

Using Lazy

{
  "felipejz/i18n-menu.nvim",
  dependencies = {
    "smjonas/snippet-converter.nvim",
  },
  config = function()
    require("i18n-menu").setup()
    vim.keymap.set("n", "<leader>ii", ":TranslateMenu<cr>")
    vim.keymap.set("n", "<leader>id", ":TranslateDefault<cr>")
  end,
}

Usage

  • :TranslationMenu - Shows the translation menu.
  • :TranslationDefault - Sets the key as the default translation, then shows the menu.

Config file

i18n.json - This optional config file should be located in the project_root and allows you to change some variables at a project level.

{
    "function_name": "t",
    "messages_dir": "/messages",
    "default_lang": "en",
    "skip_lang_select": false

}

TODO

  • Auto translate using external libraries
  • No dependecy JSON formatter

About

This plugin simplifies the management of manual translations using react i18n extensions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages