This repository was archived by the owner on Sep 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 145145 "font-weight" : "bold" ,
146146 "color" : "red"
147147 } ) ;
148+ updateLinks ( lang ) ;
148149 } else {
149150 $ ( this ) . removeClass ( 'active-lang' ) . removeAttr ( 'style' ) ;
150151 }
151152 } ) ;
152153 }
153154
154- setActiveLanguage ( ) ;
155-
156155 function constructNewPath ( lang ) {
157156 var currentPath = window . location . pathname ;
158157 var pathSegments = currentPath . split ( '/' ) ;
167166 return pathSegments . join ( '/' ) ;
168167 }
169168
169+ function updateLinks ( lang ) {
170+ var baseUrl = "https://docs.splunk.com/Observability" ;
171+ if ( lang === "ja" ) {
172+ $ ( ".navbar-brand" ) . attr ( "href" , baseUrl + "/ja/" ) ;
173+ } else {
174+ $ ( ".navbar-brand" ) . attr ( "href" , baseUrl ) ;
175+ }
176+
177+ var serviceDescUrl = "https://docs.splunk.com/observability" ;
178+ if ( lang === "ja" ) {
179+ $ ( "a.nav-link.newnavbar" ) . attr ( "href" , serviceDescUrl + "/ja/get-started/service-description.html" ) ;
180+ } else {
181+ $ ( "a.nav-link.newnavbar" ) . attr ( "href" , serviceDescUrl + "/en/get-started/service-description.html" ) ;
182+ }
183+ }
184+
170185 $ ( '.lang' ) . click ( function ( ) {
171186 var lang = $ ( this ) . data ( 'lang' ) ;
172187 var newPath = constructNewPath ( lang ) ;
173188 window . location . pathname = newPath ;
174189
175190 setActiveLanguage ( ) ;
176191 } ) ;
192+
193+ setActiveLanguage ( ) ;
177194 } ) ;
178195 </ script >
179196
You can’t perform that action at this time.
0 commit comments