File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -521,6 +521,12 @@ <h2 data-lang-key="step3_title">Final step: Copy the Generated Code</h2>
521521 } ) ;
522522 document . title = langStrings . title ;
523523
524+ // Update language switcher active state
525+ document . querySelectorAll ( '.lang-switcher a' ) . forEach ( link => {
526+ link . classList . remove ( 'active' ) ;
527+ } ) ;
528+ document . getElementById ( `lang-${ lang } ` ) . classList . add ( 'active' ) ;
529+
524530 populateDropdowns ( lang ) ;
525531 generateConfig ( ) ; // Re-generate code in case placeholder text needs to be shown
526532 }
@@ -628,8 +634,6 @@ <h2 data-lang-key="step3_title">Final step: Copy the Generated Code</h2>
628634
629635 document . addEventListener ( 'DOMContentLoaded' , ( ) => {
630636 switchLanguage ( 'en' ) ; // Set default language and populate dropdowns
631- document . getElementById ( 'lang-en' ) . classList . add ( 'active' ) ;
632- document . getElementById ( 'lang-zh' ) . classList . remove ( 'active' ) ;
633637 } ) ;
634638 </ script >
635639
You can’t perform that action at this time.
0 commit comments