// ========================================================= // ПЕРЕВОДЫ // ========================================================= const translations = { ru: { main: 'Главная', mods: 'Моды', combo: 'Комбо', gallery: 'Галерея', guides: 'Гайды', infoTitle: '📋 Информация о комбо', infoDesc: 'Giga Map Combo — это самая большая сборка карт для Euro Truck Simulator 2, объединяющая самое большое количество карт и дополнений в одно. В ней одновременно работают RoExtended, Donbass Map, Promods Europe, Promods ME, Promods MA, Promods TGS, MAPA EAA и многие другие.', versionLabel: 'Версия:', versionValue: '1.60-1.0.0.0', updateLabel: 'Последнее обновление:', updateValue: '20.06.2026', addedLabel: 'Главное из добавленного:', addedValue: 'Обновление Donbass Map, пара аддонов и обновление обновлённых модов.', instructionTitle: '📖 Инструкция по установке', dlcTitle: 'Необходимы все DLC карты', dlcDesc: 'Для корректной работы комбо-сборки требуются все официальные DLC карт: Iberia, Road to the Black Sea, Beyond the Baltic Sea, Italia, Vive la France, Scandinavia, Going East!, West Balkans, Nordic Horizons.', configTitle: 'Настройка config.cfg', configDesc: 'Необходимо зайти в файл Documents\\Euro Truck Simulator 2\\config.cfg и изменить параметр uset r_buffer_page_size на 30 (было 10).', loadOrderTitleInstr: 'Полное соответствие порядка загрузки', loadOrderDescInstr: 'Порядок модов в менеджере модов должен полностью соответствовать порядку, указанному ниже на этой странице. Малейшее отклонение может вызвать вылеты игры.', testProfileTitleSec: 'Тестовый профиль', testProfileDesc: 'Для тестирования используйте отдельный тестовый профиль.', optimizationTitle: '⚡ Оптимизация', optimizationDesc: 'Рекомендуется установить следующие параметры запуска в Steam (Свойства → Общие → Параметры запуска):', ramHeader: 'ОЗУ (RAM)', paramsHeader: 'Параметры запуска', optimizationNote: '⚠️ Важно: параметр mm_pool_size не должен превышать 80% от общего объёма ОЗУ. Для 16GB ОЗУ максимальное значение - 12800, но рекомендуется 8192 для стабильности.', legendTitle: '🔰 Условные обозначения', noteLabel: 'У мода есть примечание', newLabel: 'Недавно добавленный мод', updatedLabel: 'Недавно обновлённый мод', criticalLabel: 'Мод имеет критические ошибки', optionalLabel: 'Опциональный мод', paidLabel: 'Мод платный', altLabel: 'Мод имеет альтернативную ссылку', movedLabel: 'Недавно изменено положение', loadOrderTitle: '📋 Порядок загрузки модов', loadOrderNote: '⚠️ Внимание! Моды подключаются строго СНИЗУ ВВЕРХ.', version: 'Версия:', updated: 'Обновлён:', download: 'Скачать', comboPreview: 'Превью комбо-сборки', goto: 'Перейти к', gotoNews: '📢 Новости', gotoStats: '📊 Статистика', gotoFeatures: '💎 Преимущества', gotoProducts: '🚚 Продукты', gotoComboMods: '📦 Моды в комбо', gotoGuides: '📚 Гайды', gotoGallery: '🖼️ Галерея', gotoLinks: '🌐 Ссылки', gotoInfo: '📋 Информация', gotoInstruction: '📖 Инструкция', gotoOptimization: '⚡ Оптимизация', gotoLegend: '🔰 Условные обозначения', gotoLoadOrder: '📋 Порядок загрузки', gotoChangelog: '📝 Список изменений', gotoComboVersion: 'Версия сборки:', downloadTitle: '📦 Скачать сборку "одним файлом"', copyBtn: 'Копировать', copiedMsg: 'Ссылка скопирована!', testProfileTitle: '🧪 Тестовые профили', accordionTitle: '📁 Выберите версию игры', version_1_59: 'Версия 1.59', version_1_60: 'Версия 1.60 (последняя)', addLink: 'Добавить ссылку', changelogTitle: '📝 Список изменений (Changelog)', removedCat: '🗑️ УДАЛЕНО', updatedCat: '🔄 ОБНОВЛЕНО', addedCat: '➕ ДОБАВЛЕНО', orderChangedCat: '📍 ИЗМЕНЁН ПОРЯДОК', mirror1Text: 'Telegram', mirror2Text: 'Discord', noteModalTitle: '📝 Примечание', noteModalClose: 'Закрыть', recommendedRam: ' (Рекомендуемый минимум) ', buymod: 'Купить', author: 'Автор:', file: 'Файл:', }, en: { main: 'Main', mods: 'Mods', combo: 'Combo', gallery: 'Gallery', guides: 'Guides', infoTitle: '📋 Combo Build Info', infoDesc: 'Giga Map Combo is the largest map pack for Euro Truck Simulator 2, combining the largest number of maps and add-ons into one. It includes RoExtended, Donbass Map, Promods Europe, Promods ME, Promods MA, Promods TGS, MAPA EAA, and many others.', versionLabel: 'Version:', versionValue: '1.60-1.0.0.0', updateLabel: 'Last update:', updateValue: '20.06.2026', addedLabel: 'What\'s new:', addedValue: 'Donbass Map update, few addons and updating recently updated mods.', instructionTitle: '📖 Installation Guide', dlcTitle: 'All map DLCs required', dlcDesc: 'All official map DLCs are required: Iberia, Road to the Black Sea, Beyond the Baltic Sea, Italia, Vive la France, Scandinavia, Going East!, West Balkans, Nordic Horizons.', configTitle: 'Config.cfg settings', configDesc: 'Go to Documents\\Euro Truck Simulator 2\\config.cfg and change uset r_buffer_page_size to 30 (was 10).', loadOrderTitleInstr: 'Exact load order matching', loadOrderDescInstr: 'The mod order in mod manager must exactly match the order shown below. Any deviation may cause crashes.', testProfileTitleSec: 'Test profile', testProfileDesc: 'Use a separate test profile for testing.', optimizationTitle: '⚡ Optimization', optimizationDesc: 'It is recommended to set the following launch options in Steam (Properties → General → Launch Options):', ramHeader: 'RAM', paramsHeader: 'Launch Options', optimizationNote: '⚠️ Important: mm_pool_size should not exceed 80% of total RAM. For 16GB RAM, max is 12800, but 8192 is recommended for stability.', legendTitle: '🔰 Legend', noteLabel: 'Mod has notes', newLabel: 'Recently added mod', updatedLabel: 'Recently updated mod', criticalLabel: 'Mod has critical errors', optionalLabel: 'Optional mod', paidLabel: 'Paid mod', altLabel: 'Alternative download link', movedLabel: 'Load order position changed', loadOrderTitle: '📋 Load Order', loadOrderNote: '⚠️ Important! Mods are loaded FROM BOTTOM TO TOP.', version: 'Version:', updated: 'Updated:', download: 'Download', comboPreview: 'Combo Build Preview', goto: 'Go to ...', gotoNews: '📢 News', gotoStats: '📊 Stats', gotoFeatures: '💎 Features', gotoProducts: '🚚 Products', gotoComboMods: '📦 Combo Mods', gotoGuides: '📚 Guides', gotoGallery: '🖼️ Gallery', gotoLinks: '🌐 Links', gotoInfo: '📋 Info', gotoInstruction: '📖 Instruction', gotoOptimization: '⚡ Optimization', gotoLegend: '🔰 Legend', gotoLoadOrder: '📋 Load Order', gotoChangelog: '📝 Changelog', gotoComboVersion: 'Combo version:', downloadTitle: '📦 Download Combo "In One File"', mirror1Label: 'Mirror 1:', mirror2Label: 'Mirror 2:', copyBtn: 'Copy', copiedMsg: 'Link copied!', testProfileTitle: '🧪 Test Profiles', accordionTitle: '📁 Select game version', version_1_59: 'Version 1.59', version_1_60: 'Version 1.60 (latest)', addLink: 'Add link', changelogTitle: '📝 Changelog', removedCat: '🗑️ REMOVED', updatedCat: '🔄 UPDATED', addedCat: '➕ ADDED', orderChangedCat: '📍 LOAD ORDER CHANGED', mirror1Text: 'Telegram', mirror2Text: 'Discord', noteModalTitle: '📝 Note', noteModalClose: 'Close', recommendedRam: ' (Recommended minimum) ', buymod: 'Buy', author: 'Author:', file: 'File:', } }; function setLang(lang) { const t = translations[lang]; // Header tabs const headerTabs = document.querySelectorAll('.nav .tab'); if (headerTabs[0]) headerTabs[0].innerText = t.main; if (headerTabs[1]) headerTabs[1].innerText = t.mods; if (headerTabs[2]) headerTabs[2].innerText = t.combo; // Side panel tabs const sideTabs = document.querySelectorAll('.left-panel .tab'); if (sideTabs[0]) sideTabs[0].innerText = t.main; if (sideTabs[1]) sideTabs[1].innerText = t.mods; if (sideTabs[2]) sideTabs[2].innerText = t.combo; // Info section document.getElementById('infoTitle').innerHTML = t.infoTitle; document.getElementById('infoDesc').innerHTML = t.infoDesc; document.getElementById('versionLabel').innerHTML = t.versionLabel; document.getElementById('updateLabel').innerHTML = t.updateLabel; document.getElementById('addedLabel').innerHTML = t.addedLabel; document.getElementById('addedValue').innerHTML = t.addedValue; document.getElementById('buymod').textContent = t.buymod; // Instruction section document.getElementById('instructionTitle').innerHTML = t.instructionTitle; document.getElementById('dlcTitle').innerHTML = t.dlcTitle; document.getElementById('dlcDesc').innerHTML = t.dlcDesc; document.getElementById('configTitle').innerHTML = t.configTitle; document.getElementById('configDesc').innerHTML = t.configDesc; document.getElementById('loadOrderTitleInstr').innerHTML = t.loadOrderTitleInstr; document.getElementById('loadOrderDescInstr').innerHTML = t.loadOrderDescInstr; document.getElementById('testProfileTitleSec').innerHTML = t.testProfileTitleSec; document.getElementById('testProfileDesc').innerHTML = t.testProfileDesc; // Optimization section document.getElementById('optimizationTitle').innerHTML = t.optimizationTitle; document.getElementById('optimizationDesc').innerHTML = t.optimizationDesc; document.getElementById('ramHeader').innerHTML = t.ramHeader; document.getElementById('paramsHeader').innerHTML = t.paramsHeader; document.getElementById('optimizationNote').innerHTML = t.optimizationNote; document.getElementById('recommendedRam').innerHTML = t.recommendedRam; document.getElementById('author').innerHTML = t.author; document.getElementById('file').innerHTML = t.file; // Скачивание комбо document.getElementById('downloadTitle').innerHTML = t.downloadTitle; // Тестовый профиль document.getElementById('testProfileTitle').innerHTML = t.testProfileTitle; document.getElementById('accordionTitle').innerHTML = t.accordionTitle; // Changelog document.getElementById('changelogTitle').innerHTML = t.changelogTitle; document.querySelectorAll('.changelog-category h4.removed').forEach(el => el.innerHTML = t.removedCat); document.querySelectorAll('.changelog-category h4.updated').forEach(el => el.innerHTML = t.updatedCat); document.querySelectorAll('.changelog-category h4.added').forEach(el => el.innerHTML = t.addedCat); document.querySelectorAll('.changelog-category h4.order-changed').forEach(el => el.innerHTML = t.orderChangedCat); // Кнопка копирования document.querySelectorAll('.copy-btn').forEach(btn => { btn.textContent = t.copyBtn; }); // Legend section - перевод текста const legendTexts = document.querySelectorAll('.legend-item .legend-text'); document.getElementById('legendTitle').innerHTML = t.legendTitle; if (legendTexts[0]) legendTexts[0].textContent = t.noteLabel; if (legendTexts[1]) legendTexts[1].textContent = t.newLabel; if (legendTexts[2]) legendTexts[2].textContent = t.updatedLabel; if (legendTexts[3]) legendTexts[3].textContent = t.criticalLabel; if (legendTexts[4]) legendTexts[4].textContent = t.optionalLabel; if (legendTexts[5]) legendTexts[5].textContent = t.paidLabel; if (legendTexts[6]) legendTexts[6].textContent = t.altLabel; if (legendTexts[7]) legendTexts[7].textContent = t.movedLabel; // Также переводим data-tooltip у бейджей const badges = document.querySelectorAll('.legend-badge'); const tooltipTexts = [ t.noteLabel, t.newLabel, t.updatedLabel, t.criticalLabel, t.optionalLabel, t.paidLabel, t.altLabel, t.movedLabel ]; badges.forEach((badge, i) => { if (badge && tooltipTexts[i]) { badge.setAttribute('data-tooltip', tooltipTexts[i]); } }); // Навигационные селекты const navSelect = document.getElementById('navSelect'); if (navSelect) { const opts = navSelect.options; if (opts[0]) opts[0].text = t.goto; if (opts[1]) opts[1].text = t.gotoInfo; if (opts[2]) opts[2].text = t.gotoInstruction; if (opts[3]) opts[3].text = t.gotoOptimization; if (opts[4]) opts[4].text = t.gotoLegend; if (opts[5]) opts[5].text = t.gotoLoadOrder; if (opts[6]) opts[6].text = t.gotoChangelog; } const gotonavSelect = document.getElementById('gotonavSelect'); if (gotonavSelect) { const opts = gotonavSelect.options; if (opts[0]) opts[0].text = t.goto; if (opts[1]) opts[1].text = t.gotoInfo; if (opts[2]) opts[2].text = t.gotoInstruction; if (opts[3]) opts[3].text = t.gotoOptimization; if (opts[4]) opts[4].text = t.gotoLegend; if (opts[5]) opts[5].text = t.gotoLoadOrder; if (opts[6]) opts[6].text = t.gotoChangelog; } // Перевод для селекта версии комбо const comboVersionLabel = document.getElementById('comboVersionLabel'); if (comboVersionLabel) comboVersionLabel.textContent = t.gotoComboVersion; // Перевод опций в селекте версий - ИСПРАВЛЕНО const versionSelect = document.getElementById('comboVersionSelect'); if (versionSelect) { const opts = versionSelect.options; const values = ['1.60', '1.59', '1.58', '1.57', '1.56']; const texts = [t.version_1_60, t.version_1_59]; // Используем обычный for loop for (let i = 0; i < opts.length && i < texts.length; i++) { opts[i].textContent = texts[i]; } } // Load order section document.getElementById('loadOrderTitle').innerHTML = t.loadOrderTitle; document.getElementById('loadOrderNote').innerHTML = t.loadOrderNote; // Image alt const comboImage = document.getElementById('comboImage'); if (comboImage) comboImage.alt = t.comboPreview; // Sync selects const langSelects = document.querySelectorAll('#langSelect, #langSelectSide'); langSelects.forEach(select => { if (select.value !== lang) select.value = lang; }); // Перерисовываем порядок загрузки if (typeof renderLoadOrder === 'function') { renderLoadOrder(); } // Перерисовываем кнопки версий для профилей if (typeof renderVersionButtons === 'function') { renderVersionButtons(); } if (typeof renderChangelog === 'function' && changelogData && changelogData.versions) { renderChangelog(); } localStorage.setItem('lang', lang); } function Browselang(targetUrl) { let startTime = Date.now(); let hasClickedLinks = false; let hasHistory = false; // Проверка истории if (window.history.length > 1 || (document.referrer && document.referrer.includes(window.location.hostname))) { hasHistory = true; } if (hasHistory) { window.location.href = targetUrl; } }