企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] ## lang - plsomo 支持多语言 支持一下路径 ``` /locales/{lang}/messages.json /assets/_locales/{lang}/messages.json /assets/locales/{lang}/messages.json ``` ## 示例 ## Sample locales/en/messages.json ``` { "extensionName": { "message": "with-locales-i18n-en", "description": "Name of the extension." }, "extensionDescription": { "message": "Example using locales + i18n!", "description": "Description of the extension." }, "popup": { "message": "Logic is the beginning of wisdom, not the end.", "description": "Popup message." } } ``` package.json ``` { "manifest": { "default_locale": "en" } } ``` 使用 ``` chrome.i18n.getMessage("popup") ``` ## 使用环境变量 locales/en/messages.json ``` { ... "popup": { "message": "Logic is the beginning of wisdom, not the end. - $PLASMO_PUBLIC_QUOTE_AUTHOR", "description": "Popup message." } } ``` .env ``` PLASMO_PUBLIC_QUOTE_AUTHOR=Spock ```