MCPcopy Create free account
hub / github.com/github/docs / localization

Function localization

components/lib/localization.ts:1–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1export default function localization() {
2 const linkToEnglish = document.querySelector('#to-english-doc') as HTMLAnchorElement
3
4 if (linkToEnglish) {
5 const pathname = window.location.pathname.split('/')
6 pathname[1] = 'en'
7 linkToEnglish.href = pathname.join('/')
8 }
9}

Callers 1

initiateArticleScriptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected