Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 474d71c

Browse files
Merge pull request #1818 from splunk/feature/japanese-release
Feature/japanese release
2 parents 4ec9747 + da313e3 commit 474d71c

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

_templates/banner.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,13 @@
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('/');
@@ -167,13 +166,31 @@
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

0 commit comments

Comments
 (0)