diff --git a/packages/plugin-locale/src/templates/SelectLang.tpl b/packages/plugin-locale/src/templates/SelectLang.tpl index c47c2ef3..b1e708c5 100644 --- a/packages/plugin-locale/src/templates/SelectLang.tpl +++ b/packages/plugin-locale/src/templates/SelectLang.tpl @@ -424,18 +424,28 @@ export const SelectLang: React.FC = (props) => { const menuItemStyle = { minWidth: "160px" }; const menuItemIconStyle = { marginRight: "8px" }; const langMenu = ( - - {allLangUIConfig.map((localeObj) => { - return ( - - - {localeObj?.icon || "🌐"} - - {localeObj?.label || "en-US"} - - ); + { + return { + key: localeObj.lang || localeObj.key, + style: menuItemStyle, + label: ( + <> + + {localeObj?.icon || "🌐"} + + {localeObj?.label || "en-US"} + + ), + }; })} - + /> ); const inlineStyle = {