# backend/app/plugins/i18n_multilang/__init__.py
"""多语言支持插件

启用后：Store 和 Admin 显示语言切换按钮，Admin 表单显示英文内容字段。
禁用后：仅显示 default_locale 对应的语言，英文相关 UI 全部隐藏。
"""
from fastapi import FastAPI

PLUGIN_META = {
    "name":         "i18n_multilang",
    "display_name": "多语言支持",
    "description":  "为 Store 和 Admin 启用中英双语内容管理与语言切换。禁用后仅展示默认语言。",
    "icon":         "🌐",
    "category":     "国际化",
    "version":      "1.0.0",
    "author":       "LS",
    "has_config":   True,
    "config_fields": [
        {
            "key":     "default_locale",
            "label":   "默认语言",
            "type":    "select",
            "options": [
                {"value": "zh", "label": "中文"},
                {"value": "en", "label": "English"},
            ],
            "default": "zh",
        }
    ],
}


def init_plugin(app: FastAPI) -> None:
    return None
