Skip to content

Commit 76efe4a

Browse files
committed
enh: implement multilingual support with language switcher; update UI elements and content for English, Arabic, and Hebrew
1 parent 409c01f commit 76efe4a

3 files changed

Lines changed: 759 additions & 100 deletions

File tree

css/styles.css

Lines changed: 252 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2260,4 +2260,255 @@ input:checked + .toggle-slider:hover {
22602260
color: var(--text-secondary);
22612261
line-height: 1.6;
22622262
margin: 0;
2263-
}
2263+
}
2264+
2265+
/* Language Switcher Styles */
2266+
.modal-header-controls {
2267+
display: flex;
2268+
align-items: center;
2269+
gap: 15px;
2270+
}
2271+
2272+
.language-switcher {
2273+
display: flex;
2274+
background: rgba(255, 255, 255, 0.08);
2275+
border: 1px solid rgba(255, 255, 255, 0.1);
2276+
border-radius: 8px;
2277+
padding: 2px;
2278+
gap: 1px;
2279+
}
2280+
2281+
.lang-button {
2282+
background: none;
2283+
border: none;
2284+
padding: 6px 12px;
2285+
font-size: 12px;
2286+
font-weight: 500;
2287+
color: var(--text-secondary);
2288+
cursor: pointer;
2289+
border-radius: 6px;
2290+
transition: all 0.2s ease;
2291+
min-width: 36px;
2292+
display: flex;
2293+
align-items: center;
2294+
justify-content: center;
2295+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
2296+
}
2297+
2298+
.lang-button:hover {
2299+
background: rgba(255, 255, 255, 0.1);
2300+
color: var(--text-primary);
2301+
transform: translateY(-1px);
2302+
}
2303+
2304+
.lang-button.active {
2305+
background: var(--accent-color);
2306+
color: white;
2307+
font-weight: 600;
2308+
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
2309+
}
2310+
2311+
.lang-button.active:hover {
2312+
background: var(--accent-color);
2313+
transform: translateY(-1px);
2314+
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
2315+
}
2316+
2317+
/* Language Content Display */
2318+
.language-content {
2319+
display: block;
2320+
}
2321+
2322+
.language-content[style*="display: none"] {
2323+
display: none !important;
2324+
}
2325+
2326+
/* RTL Support for Arabic and Hebrew */
2327+
[data-lang="ar"], [data-lang="he"] {
2328+
direction: rtl;
2329+
text-align: right;
2330+
}
2331+
2332+
[data-lang="ar"] .info-intro,
2333+
[data-lang="he"] .info-intro {
2334+
direction: rtl;
2335+
text-align: right;
2336+
}
2337+
2338+
[data-lang="ar"] .section-content,
2339+
[data-lang="he"] .section-content {
2340+
direction: rtl;
2341+
text-align: right;
2342+
}
2343+
2344+
[data-lang="ar"] .section-header,
2345+
[data-lang="he"] .section-header {
2346+
direction: rtl;
2347+
text-align: right;
2348+
}
2349+
2350+
[data-lang="ar"] .section-header h3,
2351+
[data-lang="he"] .section-header h3 {
2352+
text-align: right;
2353+
}
2354+
2355+
[data-lang="ar"] .expand-icon,
2356+
[data-lang="he"] .expand-icon {
2357+
order: -1;
2358+
margin-left: 0;
2359+
margin-right: auto;
2360+
}
2361+
2362+
[data-lang="ar"] .credits-team,
2363+
[data-lang="ar"] .credits-collaborators,
2364+
[data-lang="he"] .credits-team,
2365+
[data-lang="he"] .credits-collaborators {
2366+
direction: rtl;
2367+
text-align: right;
2368+
}
2369+
2370+
[data-lang="ar"] .references,
2371+
[data-lang="he"] .references {
2372+
direction: rtl;
2373+
text-align: right;
2374+
}
2375+
2376+
/* RTL Modal Title */
2377+
[data-lang="ar"] .modal-header h1,
2378+
[data-lang="he"] .modal-header h1 {
2379+
direction: rtl;
2380+
text-align: right;
2381+
}
2382+
2383+
/* RTL adjustments for expandable sections */
2384+
[data-lang="ar"] .expandable-section,
2385+
[data-lang="he"] .expandable-section {
2386+
direction: rtl;
2387+
}
2388+
2389+
[data-lang="ar"] .section-header,
2390+
[data-lang="he"] .section-header {
2391+
flex-direction: row-reverse;
2392+
justify-content: flex-start;
2393+
}
2394+
2395+
[data-lang="ar"] .expand-icon,
2396+
[data-lang="he"] .expand-icon {
2397+
margin-left: auto;
2398+
margin-right: 0;
2399+
}
2400+
2401+
/* Tab adjustments for RTL */
2402+
[data-lang="ar"] .modal-tabs,
2403+
[data-lang="he"] .modal-tabs {
2404+
direction: rtl;
2405+
}
2406+
2407+
/* Better RTL link styling */
2408+
[data-lang="ar"] a,
2409+
[data-lang="he"] a {
2410+
direction: rtl;
2411+
}
2412+
2413+
/* Language indicator in top right for active language */
2414+
body[data-active-lang="ar"] .modal-header::before,
2415+
body[data-active-lang="he"] .modal-header::before {
2416+
content: attr(data-lang-indicator);
2417+
position: absolute;
2418+
top: 10px;
2419+
right: 10px;
2420+
font-size: 10px;
2421+
color: var(--text-secondary);
2422+
opacity: 0.6;
2423+
}
2424+
2425+
/* Enhanced language switcher with subtle animation */
2426+
.language-switcher {
2427+
position: relative;
2428+
overflow: hidden;
2429+
}
2430+
2431+
.language-switcher::before {
2432+
content: '';
2433+
position: absolute;
2434+
top: 0;
2435+
left: 0;
2436+
right: 0;
2437+
bottom: 0;
2438+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
2439+
transform: translateX(-100%);
2440+
transition: transform 0.6s ease;
2441+
}
2442+
2443+
.language-switcher:hover::before {
2444+
transform: translateX(100%);
2445+
}
2446+
2447+
/* Responsive language switcher */
2448+
@media (max-width: 768px) {
2449+
.modal-header-controls {
2450+
gap: 10px;
2451+
}
2452+
2453+
.language-switcher {
2454+
padding: 1px;
2455+
}
2456+
2457+
.lang-button {
2458+
padding: 5px 8px;
2459+
font-size: 11px;
2460+
min-width: 32px;
2461+
}
2462+
2463+
.modal-header h1 {
2464+
font-size: 18px;
2465+
}
2466+
}
2467+
2468+
@media (max-width: 480px) {
2469+
.modal-header {
2470+
flex-direction: column;
2471+
gap: 10px;
2472+
align-items: stretch;
2473+
}
2474+
2475+
.modal-header-controls {
2476+
justify-content: space-between;
2477+
width: 100%;
2478+
}
2479+
2480+
.modal-header h1 {
2481+
text-align: center;
2482+
font-size: 16px;
2483+
}
2484+
}
2485+
2486+
/* Enhanced styling for quoted English terms in RTL languages */
2487+
[data-lang="ar"] .step-description,
2488+
[data-lang="he"] .step-description {
2489+
direction: rtl;
2490+
text-align: right;
2491+
}
2492+
2493+
/* Style for quoted English UI elements in RTL languages */
2494+
[data-lang="ar"] .step-description strong,
2495+
[data-lang="he"] .step-description strong,
2496+
[data-lang="ar"] .step-description em,
2497+
[data-lang="he"] .step-description em {
2498+
font-weight: 600;
2499+
color: var(--accent-color);
2500+
direction: ltr;
2501+
display: inline;
2502+
}
2503+
2504+
/* Enhance quoted terms visibility */
2505+
[data-lang="ar"] .step-description:lang(ar),
2506+
[data-lang="he"] .step-description:lang(he) {
2507+
font-family: 'Inter', 'Arial', sans-serif;
2508+
}
2509+
2510+
/* Special styling for English quotes in RTL text */
2511+
[data-lang="ar"] .step-description,
2512+
[data-lang="he"] .step-description {
2513+
quotes: """ """ "'" "'";
2514+
}

0 commit comments

Comments
 (0)