# i18nhelper-idea **Repository Path**: neat-logic/i18nhelper-idea ## Basic Information - **Project Name**: i18nhelper-idea - **Description**: Intellij IDEA插件,能根据选中的文本,在i18n语言文件中查找匹配的key并进行替换,如果key不存在,会自动添加新的key并完成翻译。要求语言文件用json方式管理,Spring6以下需自行改造ReloadableResourceBundleMessageSource让语言文件支持json格式。 - **Primary Language**: Java - **License**: GPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 5 - **Created**: 2023-05-31 - **Last Updated**: 2024-12-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: IDEA插件, i18n自动翻译, i18n自动替换, i18n ## README

JetBrains plugins

--- ## Features 功能 Automatically convert selected text to a key in i18n. If the Chinese text does not exist, it will automatically write the key and text content into the corresponding i18n configuration file, and complete the target language translation. --- 自动转换选中文本为i18n中的key,如果中文不存在,则自动往对应的i18n配置文件中写入key和文本内容,并完成目标语言翻译。 ## Requirements 使用要求 This plugin requires that the i18n language file is in json format, for example: language_zh.json: ``` json { "common":{ "name":"name", "age":"age" } } ``` --- 本插件要求i18n语言文件是json格式,例如 language_zh.json: ``` json { "common":{ "name":"名称", "age":"年龄" } } ``` ## Usage 使用方式 ### Edit the language file path 编辑语言文件路径 ![img.png](https://github.com/neatlogic/i18nhelper-idea/raw/main/IMAGES/img.png) ### Configure shortcut keys 配置快捷键 ![img_1.png](https://github.com/neatlogic/i18nhelper-idea/raw/main/IMAGES/img_1.png) ### Select text and replace 选中文本并替换 Select any text in the editor, use the shortcut key to complete the replacement. If the key does not exist, you need to input a new key. --- 在编辑器中选中任意文本,使用快捷键即可完成替换,如果key不存在,需要输入新的key ![img.png](https://github.com/neatlogic/i18nhelper-idea/raw/main/IMAGES/img3.png) ### Switch current language 切换当前语言 ![img.png](https://github.com/neatlogic/i18nhelper-idea/raw/main/IMAGES/img4.png)