💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[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 ```