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.
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,
}
- :TranslationMenu - Shows the translation menu.
- :TranslationDefault - Sets the key as the default translation, then shows the menu.
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
}
- Auto translate using external libraries
- No dependecy JSON formatter