english-easy/js/lang.js

435 lines
25 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var LANG = {};
LANG.en = {
// Nav
'nav-home': 'Home',
'nav-vocabulary': 'Vocabulary',
'nav-grammar': 'Grammar',
'nav-pronunciation': 'Pronunciation',
'nav-exercises': 'Exercises',
'nav-tests': 'Tests',
'nav-reading': 'Reading',
'nav-progress': 'Progress',
'nav-contact': 'Contact',
// Hero
'hero-badge': '⚡ Welcome to Hogwarts School of English',
'hero-title': 'Master the <span class="highlight">Magic</span> of English',
'hero-subtitle': 'Discover vocabulary, grammar, exercises, reading, and tests — your magical journey to speaking English begins now.',
'btn-begin': '🔮 Begin Your Journey',
'btn-try': '✨ Try a Spell (Exercise)',
// Index sections
'section-subjects-title': 'Your <span>Magical</span> Subjects',
'section-subjects-subtitle': 'Like a wizard at Hogwarts, master every branch of English magic.',
'card-vocab-title': 'Vocabulary',
'card-vocab-desc': 'Learn new words with translations and example sentences. Over 20 words to start with!',
'card-vocab-btn': 'Explore Words',
'card-grammar-title': 'Grammar',
'card-grammar-desc': 'Simple explanations of English grammar with formulas and examples.',
'card-grammar-btn': 'Study Grammar',
'card-exercises-title': 'Exercises',
'card-exercises-desc': 'Practice what you learn with fun exercises. Choose answers, fill gaps, and translate.',
'card-exercises-btn': 'Practice Now',
'card-tests-title': 'Tests',
'card-tests-desc': 'Check your knowledge with a full test. 10 questions to test your skills.',
'card-tests-btn': 'Take a Test',
'card-reading-title': 'Reading',
'card-reading-desc': 'Read short and simple texts in English. Each text has questions.',
'card-reading-btn': 'Start Reading',
'card-pronunciation-title': 'Pronunciation',
'card-pronunciation-desc': 'Listen to words spoken aloud. Practice and improve your speaking.',
'card-pronunciation-btn': 'Start Speaking',
'card-progress-title': 'My Progress',
'card-progress-desc': 'Track your XP, level, and completed activities. Watch yourself improve!',
'card-progress-btn': 'View Progress',
// Houses
'section-houses-title': 'The Four <span>Houses</span>',
'section-houses-subtitle': 'Choose your path — every house has its own strength in learning English.',
'house-gryffindor-title': 'Gryffindor',
'house-gryffindor-desc': 'Brave and bold — take risks with new words and speak English without fear.',
'house-slytherin-title': 'Slytherin',
'house-slytherin-desc': 'Ambitious and determined — master grammar rules and achieve high scores.',
'house-ravenclaw-title': 'Ravenclaw',
'house-ravenclaw-desc': 'Wise and curious — dive deep into reading and expand your vocabulary.',
'house-hufflepuff-title': 'Hufflepuff',
'house-hufflepuff-desc': 'Loyal and patient — practice daily, build your streak, and grow step by step.',
// Motivation
'motivation-title': '✨ The Chamber of Progress Awaits',
'motivation-desc': 'Every great wizard started with their first spell. Begin your English magic today!',
// Page headers
'page-vocabulary-title': 'Vocabulary',
'page-vocabulary-desc': 'Learn 20+ common English words with translations and examples.',
'page-grammar-title': 'Grammar',
'page-grammar-desc': 'Simple explanations of English grammar with formulas and examples.',
'page-pronunciation-title': 'Pronunciation',
'page-pronunciation-desc': 'Listen, repeat, and improve your English pronunciation.',
'page-exercises-title': 'Exercises',
'page-exercises-desc': 'Practice your English with these fun exercises.',
'page-tests-title': 'English Test',
'page-tests-desc': 'Test your knowledge with 10 questions. Choose the correct answer for each question.',
'page-reading-title': 'Reading',
'page-reading-desc': 'Read short texts in English and check your understanding.',
'page-progress-title': 'My Progress',
'page-progress-desc': 'Track your learning journey and see how much you\'ve achieved.',
'page-contact-title': 'Contact Us',
'page-contact-desc': 'Have a question or suggestion? Send us a message!',
// Footer
'footer-text': 'Made for learning English.',
'footer-by': 'English Easy',
// Tests
'test-check': 'Check Result',
'test-result': 'Keep learning and try again!',
// Contact form
'form-name': 'Name',
'form-name-placeholder': 'Your name',
'form-email': 'Email',
'form-email-placeholder': 'your@email.com',
'form-message': 'Message',
'form-message-placeholder': 'Write your message here...',
'form-send': 'Send Message',
'form-thankyou': 'Thank you! Your message has been received.',
// Pronunciation tips
'pron-tip': '💡 Tip: Click <strong>Listen</strong> to hear the word, then repeat it out loud. Use <strong>Slow</strong> to hear it spoken slowly. Practice every day!',
'pron-common-words': 'Common <span>Words</span>',
'pron-common-phrases': 'Common <span>Phrases</span>',
'pron-tips': 'Pronunciation <span>Tips</span>',
'pron-dictation': 'Dictation <span>Practice</span>',
'pron-dictation-desc': 'Listen to the word, then type what you hear.',
'pron-th-sound': '👄 The "th" Sound',
'pron-th-desc': 'Put your tongue between your teeth and blow air.',
'pron-r-sound': '🗣️ The "r" Sound',
'pron-r-desc': 'In English, the tongue does not touch the top of the mouth.',
'pron-stress': '🎵 Word Stress',
'pron-stress-desc': 'English words have one stressed syllable. Say it louder and longer.',
'pron-listen': '🔊 Listen',
'pron-slow': '🐢 Slow',
'btn-check': 'Check',
'btn-all': 'All',
'btn-school': 'School',
'btn-family': 'Family',
'btn-food': 'Food',
'btn-daily': 'Daily Routine',
'btn-hobbies': 'Hobbies',
'vocab-english': 'English',
'vocab-translation': 'Translation',
'vocab-example': 'Example Sentence',
// Grammar
'grammar-present-simple': 'Present Simple',
'grammar-present-simple-desc': 'Present Simple is used for habits, routines, and general facts.',
'grammar-past-simple': 'Past Simple',
'grammar-past-simple-desc': 'Past Simple is used for completed actions in the past.',
'grammar-future-simple': 'Future Simple (will)',
'grammar-future-simple-desc': 'Future Simple is used for predictions, promises, and spontaneous decisions.',
'grammar-articles': 'Articles: a / an / the',
'grammar-articles-desc': 'Use <strong>a</strong> before consonant sounds, <strong>an</strong> before vowel sounds, and <strong>the</strong> for specific things.',
'grammar-pronouns': 'Pronouns',
'grammar-pronouns-desc': 'Pronouns replace nouns. They can be subject or object pronouns.',
'grammar-prepositions': 'Prepositions',
'grammar-prepositions-desc': 'Prepositions show relationships of time, place, and direction.',
};
LANG.ru = {
'nav-home': 'Главная',
'nav-vocabulary': 'Словарь',
'nav-grammar': 'Грамматика',
'nav-pronunciation': 'Произношение',
'nav-exercises': 'Упражнения',
'nav-tests': 'Тесты',
'nav-reading': 'Чтение',
'nav-progress': 'Прогресс',
'nav-contact': 'Контакты',
'hero-badge': '⚡ Добро пожаловать в Школу Английского Хогвартс',
'hero-title': 'Освой <span class="highlight">Магию</span> Английского',
'hero-subtitle': 'Словарь, грамматика, упражнения, чтение и тесты — твоё волшебное путешествие в мир английского начинается сейчас.',
'btn-begin': '🔮 Начать Путешествие',
'btn-try': '✨ Попробовать Заклинание',
'section-subjects-title': 'Твои <span>Волшебные</span> Предметы',
'section-subjects-subtitle': 'Как волшебник в Хогвартсе, освой каждую ветвь английской магии.',
'card-vocab-title': 'Словарь',
'card-vocab-desc': 'Учи новые слова с переводом и примерами. Более 20 слов для начала!',
'card-vocab-btn': 'Изучить Слова',
'card-grammar-title': 'Грамматика',
'card-grammar-desc': 'Простые объяснения английской грамматики с формулами и примерами.',
'card-grammar-btn': 'Изучить',
'card-exercises-title': 'Упражнения',
'card-exercises-desc': 'Практикуйся с весёлыми упражнениями. Выбирай ответы и переводи предложения.',
'card-exercises-btn': 'Тренироваться',
'card-tests-title': 'Тесты',
'card-tests-desc': 'Проверь свои знания. 10 вопросов, чтобы оценить твой уровень.',
'card-tests-btn': 'Пройти Тест',
'card-reading-title': 'Чтение',
'card-reading-desc': 'Читай короткие тексты на английском. К каждому есть вопросы.',
'card-reading-btn': 'Начать Чтение',
'card-pronunciation-title': 'Произношение',
'card-pronunciation-desc': 'Слушай слова вслух. Тренируй произношение и улучшай речь.',
'card-pronunciation-btn': 'Начать Говорить',
'card-progress-title': 'Мой Прогресс',
'card-progress-desc': 'Отслеживай XP, уровень и выполненные задания. Смотри, как растёшь!',
'card-progress-btn': 'Смотреть',
'section-houses-title': 'Четыре <span>Факультета</span>',
'section-houses-subtitle': 'Выбери свой путь — у каждого факультета своя сила в изучении английского.',
'house-gryffindor-title': 'Гриффиндор',
'house-gryffindor-desc': 'Храбрые и смелые — рискуй с новыми словами и говори по-английски без страха.',
'house-slytherin-title': 'Слизерин',
'house-slytherin-desc': 'Амбициозные и решительные — осваивай грамматику и достигай высоких результатов.',
'house-ravenclaw-title': 'Когтевран',
'house-ravenclaw-desc': 'Мудрые и любознательные — читай тексты и расширяй словарный запас.',
'house-hufflepuff-title': 'Пуффендуй',
'house-hufflepuff-desc': 'Верные и терпеливые — занимайся каждый день и расти шаг за шагом.',
'motivation-title': '✨ Зал Прогресса Ждёт',
'motivation-desc': 'Каждый великий волшебник начинал с первого заклинания. Начни свою английскую магию сегодня!',
'page-vocabulary-title': 'Словарь',
'page-vocabulary-desc': 'Выучи 20+ популярных английских слов с переводом и примерами.',
'page-grammar-title': 'Грамматика',
'page-grammar-desc': 'Простые объяснения английской грамматики с формулами и примерами.',
'page-pronunciation-title': 'Произношение',
'page-pronunciation-desc': 'Слушай, повторяй и улучшай своё английское произношение.',
'page-exercises-title': 'Упражнения',
'page-exercises-desc': 'Тренируй английский с помощью интересных упражнений.',
'page-tests-title': 'Тест по Английскому',
'page-tests-desc': 'Проверь знания: 10 вопросов. Выбери правильный ответ на каждый.',
'page-reading-title': 'Чтение',
'page-reading-desc': 'Читай короткие тексты на английском и проверяй понимание.',
'page-progress-title': 'Мой Прогресс',
'page-progress-desc': 'Отслеживай свой путь обучения и смотри, сколько ты достиг.',
'page-contact-title': 'Свяжитесь с Нами',
'page-contact-desc': 'Есть вопрос или предложение? Отправьте нам сообщение!',
'footer-text': 'Сделано для изучения английского.',
'footer-by': 'English Easy',
'test-check': 'Проверить',
'test-result': 'Продолжай учиться и пробуй снова!',
'form-name': 'Имя',
'form-name-placeholder': 'Ваше имя',
'form-email': 'Email',
'form-email-placeholder': 'ваш@email.com',
'form-message': 'Сообщение',
'form-message-placeholder': 'Напишите сообщение...',
'form-send': 'Отправить',
'form-thankyou': 'Спасибо! Ваше сообщение получено.',
'pron-tip': '💡 Совет: Нажми <strong>Слушать</strong>, чтобы услышать слово, затем повтори вслух. Используй <strong>Медленно</strong>, чтобы услышать медленное произношение.',
'pron-common-words': 'Популярные <span>Слова</span>',
'pron-common-phrases': 'Популярные <span>Фразы</span>',
'pron-tips': 'Советы по <span>Произношению</span>',
'pron-dictation': 'Диктант',
'pron-dictation-desc': 'Послушай слово и напиши, что услышал.',
'pron-th-sound': '👄 Звук "th"',
'pron-th-desc': 'Помести язык между зубами и выдохни воздух.',
'pron-r-sound': '🗣️ Звук "r"',
'pron-r-desc': 'В английском язык не касается нёба.',
'pron-stress': '🎵 Ударение',
'pron-stress-desc': 'В английских словах один ударный слог. Произноси его громче и длиннее.',
'pron-listen': '🔊 Слушать',
'pron-slow': '🐢 Медленно',
'btn-check': 'Проверить',
'btn-all': 'Все',
'btn-school': 'Школа',
'btn-family': 'Семья',
'btn-food': 'Еда',
'btn-daily': 'Распорядок дня',
'btn-hobbies': 'Хобби',
'vocab-english': 'Английский',
'vocab-translation': 'Перевод',
'vocab-example': 'Пример',
'grammar-present-simple': 'Настоящее Простое',
'grammar-present-simple-desc': 'Present Simple используется для привычек, рутины и общих фактов.',
'grammar-past-simple': 'Прошедшее Простое',
'grammar-past-simple-desc': 'Past Simple используется для завершённых действий в прошлом.',
'grammar-future-simple': 'Будущее Простое (will)',
'grammar-future-simple-desc': 'Future Simple используется для предсказаний, обещаний и спонтанных решений.',
'grammar-articles': 'Артикли: a / an / the',
'grammar-articles-desc': 'Используй <strong>a</strong> перед согласными, <strong>an</strong> перед гласными, <strong>the</strong> для конкретных вещей.',
'grammar-pronouns': 'Местоимения',
'grammar-pronouns-desc': 'Местоимения заменяют существительные.',
'grammar-prepositions': 'Предлоги',
'grammar-prepositions-desc': 'Предлоги показывают отношения времени, места и направления.',
};
LANG.kk = {
'nav-home': 'Басты бет',
'nav-vocabulary': 'Сөздік',
'nav-grammar': 'Грамматика',
'nav-pronunciation': 'Айтылуы',
'nav-exercises': 'Жаттығулар',
'nav-tests': 'Тесттер',
'nav-reading': 'Оқу',
'nav-progress': 'Прогресс',
'nav-contact': 'Байланыс',
'hero-badge': '⚡ Хогвартс Ағылшын Мектебіне Қош Келдіңіз',
'hero-title': 'Ағылшынның <span class="highlight">Сиқырын</span> Меңгер',
'hero-subtitle': 'Сөздік, грамматика, жаттығулар, оқу және тесттер — ағылшын тілінде сөйлеуге арналған сиқырлы саяхатың басталады.',
'btn-begin': '🔮 Саяхатты Бастау',
'btn-try': '✨ Сиқырды Қолданып Көр',
'section-subjects-title': 'Сенің <span>Сиқырлы</span> Пәндерің',
'section-subjects-subtitle': 'Хогвартстағы сиқыршы сияқты, ағылшын сиқырының әр саласын меңгер.',
'card-vocab-title': 'Сөздік',
'card-vocab-desc': 'Жаңа сөздерді аудармасымен және мысалдарымен үйрен. Бастау үшін 20+ сөз!',
'card-vocab-btn': 'Сөздерді Үйрен',
'card-grammar-title': 'Грамматика',
'card-grammar-desc': 'Ағылшын грамматикасының қарапайым түсіндірмесі формулалармен және мысалдармен.',
'card-grammar-btn': 'Грамматиканы Оқу',
'card-exercises-title': 'Жаттығулар',
'card-exercises-desc': 'Қызықты жаттығулармен тәжірибе жаса. Жауаптарды таңда және аудар.',
'card-exercises-btn': 'Жаттығу',
'card-tests-title': 'Тесттер',
'card-tests-desc': 'Біліміңді тексер. Деңгейіңді бағалау үшін 10 сұрақ.',
'card-tests-btn': 'Тест Тапсыру',
'card-reading-title': 'Оқу',
'card-reading-desc': 'Ағылшынша қысқа мәтіндерді оқы. Әр мәтін бойынша сұрақтар бар.',
'card-reading-btn': 'Оқуды Бастау',
'card-pronunciation-title': 'Айтылуы',
'card-pronunciation-desc': 'Сөздерді дауыстап тыңда. Айтылуыңды жаттықтырып, сөйлеуіңді жақсарт.',
'card-pronunciation-btn': 'Сөйлеуді Бастау',
'card-progress-title': 'Менің Прогрессім',
'card-progress-desc': 'XP, деңгей және орындалған тапсырмаларды қадағала. Өсіп келе жатқаныңды көр!',
'card-progress-btn': 'Прогресті Көру',
'section-houses-title': 'Төрт <span>Факультет</span>',
'section-houses-subtitle': 'Өз жолыңды таңда — әр факультеттің ағылшын үйренуде өз күші бар.',
'house-gryffindor-title': 'Гриффиндор',
'house-gryffindor-desc': 'Батыл және қайсар — жаңа сөздермен тәуекел ет және ағылшынша қорықпай сөйле.',
'house-slytherin-title': 'Слизерин',
'house-slytherin-desc': 'Амбициялы және табанды — грамматиканы меңгер және жоғары нәтижеге жет.',
'house-ravenclaw-title': 'Когтевран',
'house-ravenclaw-desc': 'Дана және білімқұмар — мәтіндерді оқы және сөздік қорыңды кеңейт.',
'house-hufflepuff-title': 'Хаффлпафф',
'house-hufflepuff-desc': 'Адал және сабырлы — күнделікті жаттық, streak-іңді құр және қадаммен өс.',
'motivation-title': '✨ Прогресс Залы Күтіп Тұр',
'motivation-desc': 'Әр ұлы сиқыршы өзінің бірінші сиқырынан бастады. Бүгін ағылшын сиқырыңды баста!',
'page-vocabulary-title': 'Сөздік',
'page-vocabulary-desc': '20+ танымал ағылшын сөздерін аудармамен және мысалдармен үйрен.',
'page-grammar-title': 'Грамматика',
'page-grammar-desc': 'Ағылшын грамматикасының қарапайым түсіндірмелері формулалармен және мысалдармен.',
'page-pronunciation-title': 'Айтылуы',
'page-pronunciation-desc': 'Тыңда, қайтала және ағылшын айтылуыңды жақсарт.',
'page-exercises-title': 'Жаттығулар',
'page-exercises-desc': 'Қызықты жаттығулармен ағылшын тілін жаттықтыр.',
'page-tests-title': 'Ағылшын Тесті',
'page-tests-desc': 'Біліміңді тексер: 10 сұрақ. Әр сұраққа дұрыс жауапты таңда.',
'page-reading-title': 'Оқу',
'page-reading-desc': 'Ағылшынша қысқа мәтіндерді оқы және түсінгеніңді тексер.',
'page-progress-title': 'Менің Прогрессім',
'page-progress-desc': 'Оқу саяхатыңды бақыла және қанша жеткеніңді көр.',
'page-contact-title': 'Бізбен Байланысу',
'page-contact-desc': 'Сұрағың немесе ұсынысың бар ма? Бізге хабарлама жібер!',
'footer-text': 'Ағылшын үйрену үшін жасалған.',
'footer-by': 'English Easy',
'test-check': 'Тексеру',
'test-result': 'Оқуды жалғастыр және қайтадан тырыс!',
'form-name': 'Атыңыз',
'form-name-placeholder': 'Атыңыз',
'form-email': 'Email',
'form-email-placeholder': 'сіздің@email.kz',
'form-message': 'Хабарлама',
'form-message-placeholder': 'Хабарламаңызды жазыңыз...',
'form-send': 'Жіберу',
'form-thankyou': 'Рахмет! Сіздің хабарламаңыз қабылданды.',
'pron-tip': '💡 Кеңес: <strong>Тыңдау</strong> түймесін басып сөзді есті, содан кейін дауыстап қайтала. <strong>Баяу</strong> түймесі баяу айтылуды естуге көмектеседі.',
'pron-common-words': 'Танымал <span>Сөздер</span>',
'pron-common-phrases': 'Танымал <span>Фразалар</span>',
'pron-tips': 'Айтылу <span>Кеңестері</span>',
'pron-dictation': 'Диктант',
'pron-dictation-desc': 'Сөзді тыңда және естігеніңді жаз.',
'pron-th-sound': '👄 "th" Дыбысы',
'pron-th-desc': 'Тіліңді тістеріңнің арасына салып, ауаны үрле.',
'pron-r-sound': '🗣️ "r" Дыбысы',
'pron-r-desc': 'Ағылшын тілінде тіл таңдайға тимейді.',
'pron-stress': '🎵 Сөз Екпіні',
'pron-stress-desc': 'Ағылшын сөздерінде бір екпінді буын бар. Оны қаттырақ және ұзағырақ айт.',
'pron-listen': '🔊 Тыңдау',
'pron-slow': '🐢 Баяу',
'btn-check': 'Тексеру',
'btn-all': 'Барлығы',
'btn-school': 'Мектеп',
'btn-family': 'Отбасы',
'btn-food': 'Тамақ',
'btn-daily': 'Күнделікті режим',
'btn-hobbies': 'Хобби',
'vocab-english': 'Ағылшын',
'vocab-translation': 'Аударма',
'vocab-example': 'Мысал',
'grammar-present-simple': 'Қазіргі Жай Шақ',
'grammar-present-simple-desc': 'Present Simple әдеттер, күнделікті істер және жалпы фактілер үшін қолданылады.',
'grammar-past-simple': 'Өткен Жай Шақ',
'grammar-past-simple-desc': 'Past Simple өткенде аяқталған әрекеттер үшін қолданылады.',
'grammar-future-simple': 'Келер Жай Шақ (will)',
'grammar-future-simple-desc': 'Future Simple болжамдар, уәделер және кенеттен шешімдер үшін қолданылады.',
'grammar-articles': 'Артикльдер: a / an / the',
'grammar-articles-desc': '<strong>a</strong> дауыссыз дыбыстар алдында, <strong>an</strong> дауысты дыбыстар алдында, <strong>the</strong> нақты заттар үшін.',
'grammar-pronouns': 'Есімдіктер',
'grammar-pronouns-desc': 'Есімдіктер зат есімдердің орнына қолданылады.',
'grammar-prepositions': 'Предлогтар',
'grammar-prepositions-desc': 'Предлогтар уақыт, орын және бағыт қатынасын көрсетеді.',
};
// Current language
var currentLang = localStorage.getItem('english_easy_lang') || 'en';
function setLanguage(lang) {
if (!LANG[lang]) return;
currentLang = lang;
localStorage.setItem('english_easy_lang', lang);
// Update all data-i18n elements
var elements = document.querySelectorAll('[data-i18n]');
elements.forEach(function(el) {
var key = el.getAttribute('data-i18n');
if (LANG[lang][key]) {
el.innerHTML = LANG[lang][key];
}
});
// Update placeholders
var placeholders = document.querySelectorAll('[data-i18n-placeholder]');
placeholders.forEach(function(el) {
var key = el.getAttribute('data-i18n-placeholder');
if (LANG[lang][key]) {
el.placeholder = LANG[lang][key];
}
});
// Update lang switcher UI
var btns = document.querySelectorAll('.lang-btn');
btns.forEach(function(btn) {
btn.classList.toggle('active', btn.getAttribute('data-lang') === lang);
});
// Update html lang attribute
document.documentElement.lang = lang;
}
// Init on DOM ready
document.addEventListener('DOMContentLoaded', function() {
setLanguage(currentLang);
});