Add multilingual support and new index page for System Design Primer
- Introduced new index.html file for a language selection interface, allowing users to choose their preferred documentation language. - Added README files in Arabic, Japanese, Turkish, Simplified Chinese, and Traditional Chinese to expand accessibility and support for diverse audiences. - Created an English index.md file to guide users through the updated System Design Primer resources. - Enhanced the overall structure of documentation to facilitate easier navigation and improve user experience.pull/1081/head
parent
243f5e7cd0
commit
4f3c5a77a5
|
@ -0,0 +1,11 @@
|
|||
# System Design Primer Update
|
||||
|
||||
|
||||
Welcome! This is the official English version of the System Design Primer Update which is a new version of the System Design Primer.
|
||||
|
||||
👉 Start here: [Study Guide](./study_guide.md)
|
||||
👉 The System Design Primer Update [README](./README.md)
|
||||
👉 Solve System Design Interview Questions [Solutions](./solutions.md)
|
||||
|
||||
|
||||
If you're interested in contributing or translating, check out the [contribution guidelines](../CONTRIBUTING.md) (coming soon).
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Language Selector</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
select {
|
||||
font-size: 1rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>🌍 Select Your Language</h1>
|
||||
<p>You will be redirected to the selected documentation language.</p>
|
||||
|
||||
<select id="languageSelect">
|
||||
<option value="en/">English</option>
|
||||
<option value="zh-Hans/">简体中文 (Simplified Chinese)</option>
|
||||
<option value="zh-TW/">繁體中文 (Traditional Chinese)</option>
|
||||
</select>
|
||||
|
||||
<br/><br/>
|
||||
<button onclick="redirectToSelected()">Go</button>
|
||||
|
||||
<script>
|
||||
const supportedLangs = {
|
||||
'zh-Hans': 'zh-Hans/',
|
||||
'zh-CN': 'zh-Hans/',
|
||||
'zh': 'zh-Hans/',
|
||||
'zh-TW': 'zh-TW/',
|
||||
'en': 'en/'
|
||||
};
|
||||
|
||||
function getBrowserLangFolder() {
|
||||
const lang = navigator.language || navigator.userLanguage || 'en';
|
||||
return supportedLangs[lang] || 'en/';
|
||||
}
|
||||
|
||||
function redirectToSelected() {
|
||||
const folder = document.getElementById('languageSelect').value;
|
||||
window.location.href = folder;
|
||||
}
|
||||
|
||||
// Auto-redirect if landing directly
|
||||
window.onload = function () {
|
||||
if (!window.location.hash && window.location.pathname.endsWith('/index.html')) {
|
||||
const preferred = getBrowserLangFolder();
|
||||
window.location.href = preferred;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue