File size: 42,810 Bytes
102c695
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
translations = {
    "English": {
        # Navigation
        "search_universities": "🔍 Search Universities",
        "upload_documents": "📄 Upload Documents", 
        "manage_documents": "🗂 Manage Documents",
        "about": "ℹ️ About Top.Edu",
        "navigation": "🎯 Navigation",
        
        # Main header
        "app_title": "🎓 Top.Edu",
        "app_subtitle": "Unlock ASEAN Education with AI-Powered Search",
        
        # Search page
        "search_header": "🔍 Search University Information",
        "search_description": "Ask about admissions, fees, scholarships, and programs:",
        "language_label": "Response Language",
        "your_question": "Your question:",
        "placeholder_text": "e.g., Master's in Malaysia under 40,000 RMB/year",
        "example_queries": "💡 See Example Queries",
        "complex_queries": "🧠 Complex Queries (Uses Reasoning Model)",
        "simple_queries": "⚡ Simple Queries (Uses Instruct Model)",
        "advanced_filters": "🔧 Advanced Filters (Optional)",
        "budget_range": "Budget Range (Local Currency/Year)",
        "study_level": "Study Level",
        "preferred_countries": "Preferred Countries",
        "search_button": "🔍 Search",
        "ready_to_search": "✅ Ready to search! Click the search button when you're ready.",
        "enter_question": "💭 Enter your question in the text box above to start searching.",
        "using_example": "📝 Using example:",
        "responses_in": "🌐 Responses will be in",
        
        # Upload page
        "upload_header": "📄 Upload University Documents",
        "upload_description": "Upload official PDF documents containing university admission requirements, fees, and program information.",
        "university_name": "University Name",
        "country": "Country",
        "document_type": "Document Type",
        "choose_files": "Choose PDF files",
        "drag_drop": "Drag and drop files here",
        "file_limit": "Limit 200MB per file • PDF",
        "browse_files": "Browse files",
        "process_documents": "🚀 Process Documents",
        "processing_docs": "📄 Processing document(s)...",
        "successfully_processed": "🎉 Successfully processed",
        "failed_to_process": "⚠️ Failed to process",
        "documents": "document(s)",
        "no_docs_processed": "No documents were successfully processed.",
        
        # Document types
        "admission_requirements": "Admission Requirements",
        "tuition_fees": "Tuition Fees & Costs",
        "program_information": "Program Information",
        "scholarship_info": "Scholarship Information",
        "application_deadlines": "Application Deadlines",
        "general_info": "General Information",
        
        # Manage documents page
        "manage_header": "🗂 Manage Documents",
        "manage_description": "View and manage uploaded university documents in your knowledge base.",
        "total_documents": "Total Documents",
        "total_chunks": "Total Text Chunks",
        "storage_size": "Storage Size",
        "last_updated": "Last Updated",
        "document_list": "📚 Document List",
        "no_documents": "No documents found. Upload some documents first!",
        "delete_all": "🗑️ Delete All Documents",
        "confirm_delete": "⚠️ Are you sure you want to delete ALL documents? This cannot be undone.",
        "yes_delete": "Yes, Delete All",
        "documents_deleted": "All documents have been deleted.",
        
        # About page  
        "about_header": "About Top.Edu",
        "what_we_do": "🎯 What We Do",
        "what_we_do_description": "Top.Edu helps students worldwide easily find accurate and up-to-date information on universities in Southeast Asia. Our platform aggregates official university documents and uses AI to answer questions about programs, tuition, entry requirements, and application deadlines.",
        "who_we_are": "💡 Who We Are",
        "who_we_are_description": "We are a team of education and AI enthusiasts dedicated to making higher education accessible and transparent. Our mission is to simplify the search process and provide trustworthy guidance to students looking to study abroad.",
        "contact": "📞 Contact & Support",
        "supported_languages": "🌏 Supported Languages",
        
        # Countries
        "singapore": "Singapore",
        "malaysia": "Malaysia", 
        "thailand": "Thailand",
        "indonesia": "Indonesia",
        "philippines": "Philippines",
        "vietnam": "Vietnam",
        "brunei": "Brunei",
        
        # Study levels
        "diploma": "Diploma",
        "bachelor": "Bachelor",
        "master": "Master", 
        "phd": "PhD",
        
        # Budget options
        "any": "Any",
        "under_10k": "<10k",
        "10k_20k": "10k-20k",
        "20k_30k": "20k-30k", 
        "30k_40k": "30k-40k",
        "over_40k": ">40k",
        
        # Example queries
        "example_complex_1": "Show me universities in Malaysia for master's degrees with tuition under 40,000 RMB per year",
        "example_complex_2": "Compare engineering programs in Thailand and Singapore under $15,000 per year",
        "example_complex_3": "Find MBA programs in ASEAN with GMAT requirements and scholarships available",
        "example_complex_4": "Universities in Indonesia with English-taught programs and no IELTS requirement",
        "example_simple_1": "What does IELTS stand for?",
        "example_simple_2": "What is the difference between bachelor and master degree?",
        "example_simple_3": "How to apply for student visa?",
        "example_simple_4": "What documents are needed for university application?",
        
        # System messages
        "systems_initialized": "✅ Systems initialized successfully!",
        "can_upload_documents": "You can now upload documents.",
        "initialization_error": "Error initializing systems",
        "installation_help": """**Possible solutions:**
1. Install sentence-transformers: `pip install sentence-transformers`
2. Or provide OpenAI API key in environment variables
3. Check that PyTorch is properly installed

**For deployment:**
- Ensure requirements.txt includes: sentence-transformers, torch, transformers""",
        "please_initialize_first": "Please initialize systems first using the 'Initialize System' tab!",
        "please_upload_pdf": "Please upload at least one PDF file.",
        "upload_pdf_only": "Please upload PDF files only.",
        "successfully_processed_docs": "Successfully processed",
        "failed_create_vectorstore": "Failed to create vector store from documents.",
        "no_docs_successfully_processed": "No documents were successfully processed. Please check if your PDFs are readable.",
        "error_processing_docs": "Error processing documents",
        "check_console": "Please check the console for more details.",
        "please_upload_process_first": "Please upload and process documents first using the 'Upload Documents' tab!",
        "please_enter_question": "Please enter a question.",
        "processing_query": "Processing query",
        "model_used": "Model Used",
        "answer": "Answer",
        "sources": "Sources",
        "no_sources_found": "No specific sources found. This might be a general response.",
        "error_querying_docs": "Error querying documents",
        "ready_for_queries": "Ready for queries! Go to the 'Search & Query' tab to start asking questions.",
        
        # Interface elements
        "initialize_system": "Initialize System",
        "initialize_systems": "Initialize Systems",
        "initialization_status": "Initialization Status",
    },
    
    "中文": {
        # Navigation
        "search_universities": "🔍 搜索大学",
        "upload_documents": "📄 上传文档",
        "manage_documents": "🗂 管理文档",
        "about": "ℹ️ 关于Top.Edu",
        "navigation": "🎯 导航",
        
        # Main header
        "app_title": "🎓 Top.Edu",
        "app_subtitle": "用AI驱动的搜索解锁东盟教育机会",
        
        # Search page
        "search_header": "🔍 搜索大学信息",
        "search_description": "询问关于入学要求、学费、奖学金和专业项目:",
        "language_label": "回复语言",
        "your_question": "您的问题:",
        "placeholder_text": "例如:马来西亚硕士学位,学费低于4万人民币/年",
        "example_queries": "💡 查看示例问题",
        "complex_queries": "🧠 复杂查询(使用推理模型)",
        "simple_queries": "⚡ 简单查询(使用指令模型)",
        "advanced_filters": "🔧 高级筛选(可选)",
        "budget_range": "预算范围(当地货币/年)",
        "study_level": "学历层次",
        "preferred_countries": "首选国家",
        "search_button": "🔍 搜索",
        "ready_to_search": "✅ 准备搜索!准备好后点击搜索按钮。",
        "enter_question": "💭 在上面的文本框中输入您的问题开始搜索。",
        "using_example": "📝 使用示例:",
        "responses_in": "🌐 回复将使用",
        
        # Upload page
        "upload_header": "📄 上传大学文档",
        "upload_description": "上传包含大学入学要求、学费和专业信息的官方PDF文档。",
        "university_name": "大学名称",
        "country": "国家",
        "document_type": "文档类型",
        "choose_files": "选择PDF文件",
        "drag_drop": "将文件拖放到此处",
        "file_limit": "限制每个文件200MB • PDF",
        "browse_files": "浏览文件",
        "process_documents": "🚀 处理文档",
        "processing_docs": "📄 正在处理文档...",
        "successfully_processed": "🎉 成功处理",
        "failed_to_process": "⚠️ 处理失败",
        "documents": "个文档",
        "no_docs_processed": "没有成功处理任何文档。",
        
        # Document types
        "admission_requirements": "入学要求",
        "tuition_fees": "学费和费用",
        "program_information": "专业信息",
        "scholarship_info": "奖学金信息",
        "application_deadlines": "申请截止日期",
        "general_info": "一般信息",
        
        # Manage documents page
        "manage_header": "🗂 管理文档",
        "manage_description": "查看和管理您知识库中上传的大学文档。",
        "total_documents": "文档总数",
        "total_chunks": "文本块总数",
        "storage_size": "存储大小",
        "last_updated": "最后更新",
        "document_list": "📚 文档列表",
        "no_documents": "未找到文档。请先上传一些文档!",
        "delete_all": "🗑️ 删除所有文档",
        "confirm_delete": "⚠️ 您确定要删除所有文档吗?此操作无法撤消。",
        "yes_delete": "是的,删除全部",
        "documents_deleted": "所有文档已被删除。",
        
        # About page
        "about_header": "关于 Top.Edu",
        "what_we_do": "🎯 我们的工作",
        "what_we_do_description": "Top.Edu 帮助全球学生轻松获取东南亚高校的准确且最新的信息。我们的平台整合官方大学文件,并利用 AI 回答有关课程、学费、入学要求和申请截止日期的问题。",
        "who_we_are": "💡 我们是谁",
        "who_we_are_description": "我们是一支热衷教育与 AI 的团队,致力于让高等教育变得更透明可及。我们的使命是简化搜索流程,为希望出国留学的学生提供可靠指导。",
        "contact": "📞 联系与支持",
        "supported_languages": "🌏 支持语言",
        
        # Countries
        "singapore": "新加坡",
        "malaysia": "马来西亚",
        "thailand": "泰国",
        "indonesia": "印度尼西亚",
        "philippines": "菲律宾",
        "vietnam": "越南",
        "brunei": "文莱",
        
        # Study levels
        "diploma": "文凭",
        "bachelor": "学士",
        "master": "硕士",
        "phd": "博士",
        
        # Budget options
        "any": "任意",
        "under_10k": "<1万",
        "10k_20k": "1-2万",
        "20k_30k": "2-3万",
        "30k_40k": "3-4万", 
        "over_40k": ">4万",
        
        # Example queries
        "example_complex_1": "为我推荐马来西亚学费低于4万人民币/年的硕士学位项目",
        "example_complex_2": "比较泰国和新加坡学费低于1.5万美元/年的工程专业",
        "example_complex_3": "寻找东盟地区有GMAT要求和奖学金的MBA项目",
        "example_complex_4": "印尼有英语授课且无需雅思的大学项目",
        "example_simple_1": "IELTS是什么意思?",
        "example_simple_2": "学士学位和硕士学位有什么区别?",
        "example_simple_3": "如何申请学生签证?",
        "example_simple_4": "大学申请需要哪些文件?",
        
        # System messages
        "systems_initialized": "✅ 系统初始化成功!",
        "can_upload_documents": "您现在可以上传文档。",
        "initialization_error": "系统初始化错误",
        "installation_help": """**可能的解决方案:**
1. 安装 sentence-transformers: `pip install sentence-transformers`
2. 或在环境变量中提供 OpenAI API 密钥
3. 检查 PyTorch 是否正确安装

**部署时:**
- 确保 requirements.txt 包含:sentence-transformers, torch, transformers""",
        "please_initialize_first": "请先使用'初始化系统'选项卡初始化系统!",
        "please_upload_pdf": "请至少上传一个PDF文件。",
        "upload_pdf_only": "请仅上传PDF文件。",
        "successfully_processed_docs": "成功处理",
        "failed_create_vectorstore": "创建向量存储失败。",
        "no_docs_successfully_processed": "没有成功处理任何文档。请检查您的PDF是否可读。",
        "error_processing_docs": "处理文档时出错",
        "check_console": "请查看控制台获取更多详细信息。",
        "please_upload_process_first": "请先使用'上传文档'选项卡上传和处理文档!",
        "please_enter_question": "请输入问题。",
        "processing_query": "正在处理查询",
        "model_used": "使用的模型",
        "answer": "答案",
        "sources": "来源",
        "no_sources_found": "未找到特定来源。这可能是一般性回答。",
        "error_querying_docs": "查询文档时出错",
        "ready_for_queries": "准备查询!前往'搜索与查询'选项卡开始提问。",
        
        # Interface elements
        "initialize_system": "初始化系统",
        "initialize_systems": "初始化系统",
        "initialization_status": "初始化状态",
    },
    
    "Malay": {
        # Navigation
        "search_universities": "🔍 Cari Universiti",
        "upload_documents": "📄 Muat Naik Dokumen",
        "manage_documents": "🗂 Urus Dokumen",
        "about": "ℹ️ Mengenai Top.Edu",
        "navigation": "🎯 Navigasi",
        
        # Main header
        "app_title": "🎓 Top.Edu",
        "app_subtitle": "Buka Pendidikan ASEAN dengan Carian Berkuasa AI",
        
        # Search page
        "search_header": "🔍 Cari Maklumat Universiti",
        "search_description": "Tanya tentang kemasukan, yuran, biasiswa, dan program:",
        "language_label": "Bahasa Respons",
        "your_question": "Soalan anda:",
        "placeholder_text": "cth: Ijazah Sarjana di Malaysia di bawah 40,000 RMB/tahun",
        "example_queries": "💡 Lihat Contoh Soalan",
        "complex_queries": "🧠 Soalan Kompleks (Menggunakan Model Penaakulan)",
        "simple_queries": "⚡ Soalan Mudah (Menggunakan Model Arahan)",
        "advanced_filters": "🔧 Penapis Lanjutan (Pilihan)",
        "budget_range": "Julat bajet (mata wang tempatan/tahun)",
        "study_level": "Tahap Pengajian",
        "preferred_countries": "Negara Pilihan",
        "search_button": "🔍 Cari",
        "ready_to_search": "✅ Sedia untuk cari! Klik butang cari bila anda sedia.",
        "enter_question": "💭 Masukkan soalan anda di kotak teks di atas untuk mula mencari.",
        "using_example": "📝 Menggunakan contoh:",
        "responses_in": "🌐 Respons akan dalam bahasa",
        
        # Upload page
        "upload_header": "📄 Muat Naik Dokumen Universiti",
        "upload_description": "Muat naik dokumen PDF rasmi yang mengandungi keperluan kemasukan universiti, yuran, dan maklumat program.",
        "university_name": "Nama Universiti",
        "country": "Negara",
        "document_type": "Jenis Dokumen",
        "choose_files": "Pilih fail PDF",
        "drag_drop": "Seret dan lepas fail di sini",
        "file_limit": "Had 200MB setiap fail • PDF",
        "browse_files": "Layari fail",
        "process_documents": "🚀 Proses Dokumen",
        "processing_docs": "📄 Memproses dokumen...",
        "successfully_processed": "🎉 Berjaya diproses",
        "failed_to_process": "⚠️ Gagal diproses",
        "documents": "dokumen",
        "no_docs_processed": "Tiada dokumen yang berjaya diproses.",
        
        # Document types
        "admission_requirements": "Keperluan Kemasukan",
        "tuition_fees": "Yuran Pengajian & Kos",
        "program_information": "Maklumat Program",
        "scholarship_info": "Maklumat Biasiswa",
        "application_deadlines": "Tarikh Tutup Permohonan",
        "general_info": "Maklumat Umum",
        
        # Manage documents page
        "manage_header": "🗂 Urus Dokumen",
        "manage_description": "Lihat dan urus dokumen universiti yang dimuat naik dalam pangkalan pengetahuan anda.",
        "total_documents": "Jumlah Dokumen",
        "total_chunks": "Jumlah Bahagian Teks",
        "storage_size": "Saiz Storan",
        "last_updated": "Kemaskini Terakhir",
        "document_list": "📚 Senarai Dokumen",
        "no_documents": "Tiada dokumen dijumpai. Muat naik beberapa dokumen dahulu!",
        "delete_all": "🗑️ Padam Semua Dokumen",
        "confirm_delete": "⚠️ Adakah anda pasti mahu memadam SEMUA dokumen? Tindakan ini tidak boleh dibatalkan.",
        "yes_delete": "Ya, Padam Semua",
        "documents_deleted": "Semua dokumen telah dipadam.",
        
        # About page  
        "about_header": "Tentang Top.Edu",
        "what_we_do": "🎯 Apa Yang Kami Lakukan",
        "what_we_do_description": "Top.Edu membantu pelajar di seluruh dunia untuk mencari maklumat tepat dan terkini mengenai universiti di Asia Tenggara dengan mudah. Platform kami menggabungkan dokumen rasmi universiti dan menggunakan AI untuk menjawab soalan tentang program, yuran pengajian, syarat kemasukan, dan tarikh akhir permohonan.",
        "who_we_are": "💡 Siapa Kami",
        "who_we_are_description": "Kami adalah pasukan yang berminat dalam pendidikan dan AI, berdedikasi untuk menjadikan pendidikan tinggi lebih mudah diakses dan telus. Misi kami adalah mempermudah proses carian dan memberikan panduan yang boleh dipercayai kepada pelajar yang ingin belajar di luar negara.",
        "contact": "📞 Hubungi & Sokongan",
        "supported_languages": "🌏 Bahasa Disokong",
        
        # Countries
        "singapore": "Singapura",
        "malaysia": "Malaysia",
        "thailand": "Thailand",
        "indonesia": "Indonesia",
        "philippines": "Filipina",
        "vietnam": "Vietnam",
        "brunei": "Brunei",
        
        # Study levels
        "diploma": "Diploma",
        "bachelor": "Sarjana Muda",
        "master": "Sarjana",
        "phd": "PhD",
        
        # Budget options
        "any": "Mana-mana",
        "under_10k": "<10k",
        "10k_20k": "10k-20k",
        "20k_30k": "20k-30k",
        "30k_40k": "30k-40k", 
        "over_40k": ">40k",
        
        # Example queries
        "example_complex_1": "Tunjukkan saya universiti di Malaysia untuk ijazah sarjana dengan yuran di bawah 40,000 RMB setahun",
        "example_complex_2": "Bandingkan program kejuruteraan di Thailand dan Singapura di bawah $15,000 setahun",
        "example_complex_3": "Cari program MBA di ASEAN dengan keperluan GMAT dan biasiswa tersedia",
        "example_complex_4": "Universiti di Indonesia dengan program bahasa Inggeris dan tanpa keperluan IELTS",
        "example_simple_1": "Apakah maksud IELTS?",
        "example_simple_2": "Apakah perbezaan antara ijazah sarjana muda dan sarjana?",
        "example_simple_3": "Bagaimana untuk memohon visa pelajar?",
        "example_simple_4": "Dokumen apakah yang diperlukan untuk permohonan universiti?",
    },
    
    "ไทย": {
        # Navigation  
        "search_universities": "🔍 ค้นหามหาวิทยาลัย",
        "upload_documents": "📄 อัพโหลดเอกสาร",
        "manage_documents": "🗂 จัดการเอกสาร",
        "about": "ℹ️ เกี่ยวกับ Top.Edu",
        "navigation": "🎯 เมนูหลัก",
        
        # Main header
        "app_title": "🎓 Top.Edu",
        "app_subtitle": "ปลดล็อกการศึกษาอาเซียนด้วยการค้นหาที่ขับเคลื่อนด้วย AI",
        
        # Search page
        "search_header": "🔍 ค้นหาข้อมูลมหาวิทยาลัย",
        "search_description": "ถามเกี่ยวกับการเข้าเรียน ค่าใช้จ่าย ทุนการศึกษา และหลักสูตร:",
        "language_label": "ภาษาการตอบ",
        "your_question": "คำถามของคุณ:",
        "placeholder_text": "เช่น ปริญญาโทในมาเลเซียต่ำกว่า 40,000 หยวนจีน/ปี",
        "example_queries": "💡 ดูตัวอย่างคำถาม",
        "complex_queries": "🧠 คำถามซับซ้อน (ใช้โมเดลการให้เหตุผล)",
        "simple_queries": "⚡ คำถามง่าย (ใช้โมเดลคำสั่ง)",
        "advanced_filters": "🔧 ตัวกรองขั้นสูง (ตัวเลือก)",
        "budget_range": "ช่วงงบประมาณ (สกุลเงินท้องถิ่น/ปี)",
        "study_level": "ระดับการศึกษา",
        "preferred_countries": "ประเทศที่ต้องการ",
        "search_button": "🔍 ค้นหา",
        "ready_to_search": "✅ พร้อมค้นหา! คลิกปุ่มค้นหาเมื่อคุณพร้อม",
        "enter_question": "💭 ใส่คำถามในกล่องข้อความด้านบนเพื่อเริ่มค้นหา",
        "using_example": "📝 ใช้ตัวอย่าง:",
        "responses_in": "🌐 จะตอบเป็นภาษา",
        
        # Upload page
        "upload_header": "📄 อัพโหลดเอกสารมหาวิทยาลัย",
        "upload_description": "อัพโหลดเอกสาร PDF ที่มีข้อกำหนดการรับเข้า ค่าธรรมเนียม และข้อมูลหลักสูตร",
        "university_name": "ชื่อมหาวิทยาลัย",
        "country": "ประเทศ",
        "document_type": "ประเภทเอกสาร",
        "choose_files": "เลือกไฟล์ PDF",
        "file_limit": "จำกัด 200MB ต่อไฟล์ • PDF",
        "process_documents": "🚀 ประมวลผลเอกสาร",
        "processing_docs": "📄 กำลังประมวลผลเอกสาร...",
        "successfully_processed": "🎉 ประมวลผลสำเร็จ",
        "failed_to_process": "⚠️ ประมวลผลล้มเหลว",
        "documents": "เอกสาร",
        "no_docs_processed": "ไม่สามารถประมวลผลเอกสารใดได้สำเร็จ",
        
        # Document types
        "admission_requirements": "ข้อกำหนดการรับเข้า",
        "tuition_fees": "ค่าธรรมเนียมการศึกษา",
        "program_information": "ข้อมูลหลักสูตร",
        "scholarship_info": "ข้อมูลทุนการศึกษา",
        "application_deadlines": "กำหนดส่งใบสมัคร",
        "general_info": "ข้อมูลทั่วไป",
        
        # Manage documents page
        "manage_header": "🗂 จัดการเอกสาร",
        "manage_description": "ดูและจัดการเอกสารมหาวิทยาลัยในฐานข้อมูลของคุณ",
        "total_documents": "เอกสารทั้งหมด",
        "total_chunks": "ส่วนข้อความทั้งหมด",
        "storage_size": "ขนาดที่เก็บข้อมูล",
        "last_updated": "อัปเดตล่าสุด",
        "document_list": "📚 รายการเอกสาร",
        "no_documents": "ไม่พบเอกสาร อัปโหลดเอกสารก่อน!",
        "delete_all": "🗑️ ลบเอกสารทั้งหมด",
        "documents_deleted": "เอกสารทั้งหมดถูกลบแล้ว",
        
        # About page
        "about_header": "เกี่ยวกับ Top.Edu",
        "what_we_do": "🎯 สิ่งที่เราทำ",
        "what_we_do_description": "Top.Edu ช่วยให้นักเรียนทั่วโลกสามารถค้นหาข้อมูลที่ถูกต้องและทันสมัยเกี่ยวกับมหาวิทยาลัยในเอเชียตะวันออกเฉียงใต้ได้อย่างง่ายดาย แพลตฟอร์มของเรารวบรวมเอกสารทางการของมหาวิทยาลัยและใช้ AI เพื่อตอบคำถามเกี่ยวกับหลักสูตร ค่าเล่าเรียน ข้อกำหนดการเข้าเรียน และกำหนดส่งใบสมัคร",
        "who_we_are": "💡 เราคือใคร",
        "who_we_are_description": "เราคือทีมผู้ที่ชื่นชอบการศึกษาและ AI มุ่งมั่นที่จะทำให้การศึกษาระดับอุดมศึกษาสามารถเข้าถึงได้และโปร่งใส ภารกิจของเราคือทำให้กระบวนการค้นหาง่ายขึ้นและให้คำแนะนำที่เชื่อถือได้แก่นักเรียนที่ต้องการศึกษาต่อต่างประเทศ",
        "contact": "📞 ติดต่อ & สนับสนุน",
        "supported_languages": "🌏 ภาษาที่รองรับ",
        
        # Countries
        "singapore": "สิงคโปร์",
        "malaysia": "มาเลเซีย", 
        "thailand": "ไทย",
        "indonesia": "อินโดนีเซีย",
        "philippines": "ฟิลิปปินส์",
        "vietnam": "เวียดนาม",
        "brunei": "บรูไน",
        
        # Study levels
        "diploma": "ประกาศนียบัตร",
        "bachelor": "ปริญญาตรี",
        "master": "ปริญญาโท",
        "phd": "ปริญญาเอก",
        
        # Budget options
        "any": "ใดก็ได้",
        "under_10k": "<10k",
        "10k_20k": "10k-20k",
        "20k_30k": "20k-30k",
        "30k_40k": "30k-40k",
        "over_40k": ">40k",
        
        # Example queries
        "example_complex_1": "แสดงมหาวิทยาลัยในมาเลเซียสำหรับปริญญาโทที่มีค่าเล่าเรียนต่ำกว่า 40,000 หยวนต่อปี",
        "example_complex_2": "เปรียบเทียบหลักสูตรวิศวกรรมในไทยและสิงคโปร์ต่ำกว่า $15,000 ต่อปี",
        "example_complex_3": "ค้นหาหลักสูตร MBA ในอาเซียนที่มีข้อกำหนด GMAT และทุนการศึกษา",
        "example_complex_4": "มหาวิทยาลัยในอินโดนีเซียที่มีหลักสูตรสอนภาษาอังกฤษและไม่ต้องการ IELTS",
        "example_simple_1": "IELTS ย่อมาจากอะไร?",
        "example_simple_2": "ความแตกต่างระหว่างปริญญาตรีและปริญญาโทคืออะไร?",
        "example_simple_3": "วิธีสมัครวีซ่านักเรียนอย่างไร?",
        "example_simple_4": "เอกสารอะไรบ้างที่จำเป็นสำหรับการสมัครเข้ามหาวิทยาลัย?",
    },
    
    "Indonesian": {
        # Navigation
        "search_universities": "🔍 Cari Universitas",
        "upload_documents": "📄 Unggah Dokumen",
        "manage_documents": "🗂 Kelola Dokumen",
        "about": "ℹ️ Tentang Top.Edu",
        "navigation": "🎯 Navigasi",
        
        # Main header
        "app_title": "🎓 Top.Edu",
        "app_subtitle": "Buka Pendidikan ASEAN dengan Pencarian Bertenaga AI",
        
        # Search page
        "search_header": "🔍 Cari Informasi Universitas",
        "search_description": "Tanya tentang penerimaan, biaya, beasiswa, dan program:",
        "language_label": "Bahasa Respon",
        "your_question": "Pertanyaan Anda:",
        "placeholder_text": "mis: Magister di Malaysia di bawah 40.000 RMB/tahun",
        "example_queries": "💡 Lihat Contoh Pertanyaan",
        "complex_queries": "🧠 Pertanyaan Kompleks (Menggunakan Model Penalaran)",
        "simple_queries": "⚡ Pertanyaan Sederhana (Menggunakan Model Instruksi)",
        "advanced_filters": "🔧 Filter Lanjutan (Opsional)",
        "budget_range": "Rentang anggaran (mata uang lokal/tahun)",
        "study_level": "Tingkat Studi",
        "preferred_countries": "Negara Pilihan",
        "search_button": "🔍 Cari",
        "ready_to_search": "✅ Siap mencari! Klik tombol cari saat Anda siap.",
        "enter_question": "💭 Masukkan pertanyaan di kotak teks di atas untuk mulai mencari.",
        "using_example": "📝 Menggunakan contoh:",
        "responses_in": "🌐 Respon akan dalam bahasa",
        
        # Upload page
        "upload_header": "📄 Unggah Dokumen Universitas",
        "upload_description": "Unggah dokumen PDF berisi persyaratan masuk universitas, biaya, dan informasi program.",
        "university_name": "Nama Universitas",
        "country": "Negara",
        "document_type": "Jenis Dokumen",
        "choose_files": "Pilih file PDF",
        "file_limit": "Batas 200MB per file • PDF",
        "process_documents": "🚀 Proses Dokumen",
        "processing_docs": "📄 Memproses dokumen...",
        "successfully_processed": "🎉 Berhasil diproses",
        "failed_to_process": "⚠️ Gagal diproses",
        "documents": "dokumen",
        "no_docs_processed": "Tidak ada dokumen yang berhasil diproses.",
        
        # Document types
        "admission_requirements": "Persyaratan Masuk",
        "tuition_fees": "Biaya Kuliah & Biaya",
        "program_information": "Informasi Program",
        "scholarship_info": "Informasi Beasiswa",
        "application_deadlines": "Batas Waktu Aplikasi",
        "general_info": "Informasi Umum",
        
        # Manage documents page
        "manage_header": "🗂 Kelola Dokumen",
        "manage_description": "Lihat dan kelola dokumen universitas dalam basis pengetahuan Anda.",
        "total_documents": "Total Dokumen",
        "total_chunks": "Total Bagian Teks",
        "storage_size": "Ukuran Penyimpanan",
        "last_updated": "Terakhir Diperbarui",
        "document_list": "📚 Daftar Dokumen",
        "no_documents": "Tidak ada dokumen ditemukan. Unggah beberapa dokumen terlebih dahulu!",
        "delete_all": "🗑️ Hapus Semua Dokumen",
        "documents_deleted": "Semua dokumen telah dihapus.",
        
        # About page
        "about_header": "Tentang Top.Edu",
        "what_we_do": "🎯 Apa Yang Kami Lakukan",
        "what_we_do_description": "Top.Edu membantu mahasiswa di seluruh dunia dengan mudah menemukan informasi yang akurat dan terbaru tentang universitas di Asia Tenggara. Platform kami mengumpulkan dokumen resmi universitas dan menggunakan AI untuk menjawab pertanyaan tentang program, biaya kuliah, persyaratan masuk, dan tenggat waktu pendaftaran.",
        "who_we_are": "💡 Siapa Kami",
        "who_we_are_description": "Kami adalah tim yang bersemangat di bidang pendidikan dan AI, berdedikasi untuk membuat pendidikan tinggi lebih mudah diakses dan transparan. Misi kami adalah menyederhanakan proses pencarian dan memberikan panduan terpercaya bagi mahasiswa yang ingin belajar di luar negeri.",
        "contact": "📞 Kontak & Dukungan",
        "supported_languages": "🌏 Bahasa Didukung",
        
        # Countries
        "singapore": "Singapura",
        "malaysia": "Malaysia",
        "thailand": "Thailand", 
        "indonesia": "Indonesia",
        "philippines": "Filipina",
        "vietnam": "Vietnam",
        "brunei": "Brunei",
        
        # Study levels
        "diploma": "Diploma",
        "bachelor": "Sarjana",
        "master": "Magister",
        "phd": "Doktor",
        
        # Budget options
        "any": "Apa saja",
        "under_10k": "<10k",
        "10k_20k": "10k-20k",
        "20k_30k": "20k-30k",
        "30k_40k": "30k-40k",
        "over_40k": ">40k",
        
        # Example queries
        "example_complex_1": "Tunjukkan universitas di Malaysia untuk gelar magister dengan biaya kuliah di bawah 40.000 RMB per tahun",
        "example_complex_2": "Bandingkan program teknik di Thailand dan Singapura di bawah $15.000 per tahun",
        "example_complex_3": "Cari program MBA di ASEAN dengan persyaratan GMAT dan beasiswa tersedia",
        "example_complex_4": "Universitas di Indonesia dengan program berbahasa Inggris tanpa persyaratan IELTS",
        "example_simple_1": "Apa kepanjangan dari IELTS?",
        "example_simple_2": "Apa perbedaan antara gelar sarjana dan magister?",
        "example_simple_3": "Bagaimana cara mengajukan visa pelajar?",
        "example_simple_4": "Dokumen apa saja yang diperlukan untuk aplikasi universitas?",
    },
    
    "Tiếng Việt": {
        # Navigation
        "search_universities": "🔍 Tìm kiếm Trường đại học",
        "upload_documents": "📄 Tải lên Tài liệu",
        "manage_documents": "🗂 Quản lý Tài liệu", 
        "about": "ℹ️ Về Top.Edu",
        "navigation": "🎯 Điều hướng",
        
        # Main header
        "app_title": "🎓 Top.Edu",
        "app_subtitle": "Mở khóa Giáo dục ASEAN với Tìm kiếm được hỗ trợ bởi AI",
        
        # Search page
        "search_header": "🔍 Tìm kiếm Thông tin Trường đại học",
        "search_description": "Hỏi về tuyển sinh, học phí, học bổng và chương trình:",
        "language_label": "Ngôn ngữ Phản hồi",
        "your_question": "Câu hỏi của bạn:",
        "placeholder_text": "vd: Thạc sĩ tại Malaysia dưới 40.000 tệ/năm",
        "example_queries": "💡 Xem Câu hỏi Mẫu",
        "complex_queries": "🧠 Câu hỏi Phức tạp (Sử dụng Mô hình Lý luận)",
        "simple_queries": "⚡ Câu hỏi Đơn giản (Sử dụng Mô hình Hướng dẫn)",
        "advanced_filters": "🔧 Bộ lọc Nâng cao (Tùy chọn)",
        "budget_range": "Khoảng ngân sách (tiền tệ địa phương/năm)",
        "study_level": "Bậc học",
        "preferred_countries": "Quốc gia Ưa thích",
        "search_button": "🔍 Tìm kiếm",
        "ready_to_search": "✅ Sẵn sàng tìm kiếm! Nhấp vào nút tìm kiếm khi bạn sẵn sàng.",
        "enter_question": "💭 Nhập câu hỏi vào hộp văn bản ở trên để bắt đầu tìm kiếm.",
        "using_example": "📝 Sử dụng ví dụ:",
        "responses_in": "🌐 Phản hồi sẽ bằng tiếng",
        
        # Upload page
        "upload_header": "📄 Tải lên Tài liệu Đại học",
        "upload_description": "Tải lên tài liệu PDF chứa yêu cầu tuyển sinh, học phí và thông tin chương trình của đại học.",
        "university_name": "Tên Đại học",
        "country": "Quốc gia",
        "document_type": "Loại Tài liệu",
        "choose_files": "Chọn file PDF",
        "file_limit": "Giới hạn 200MB mỗi file • PDF",
        "process_documents": "🚀 Xử lý Tài liệu",
        "processing_docs": "📄 Đang xử lý tài liệu...",
        "successfully_processed": "🎉 Xử lý thành công",
        "failed_to_process": "⚠️ Xử lý thất bại",
        "documents": "tài liệu",
        "no_docs_processed": "Không có tài liệu nào được xử lý thành công.",
        
        # Document types
        "admission_requirements": "Yêu cầu Tuyển sinh",
        "tuition_fees": "Học phí & Chi phí",
        "program_information": "Thông tin Chương trình",
        "scholarship_info": "Thông tin Học bổng",
        "application_deadlines": "Hạn nộp Đơn",
        "general_info": "Thông tin Chung",
        
        # Manage documents page
        "manage_header": "🗂 Quản lý Tài liệu",
        "manage_description": "Xem và quản lý tài liệu đại học trong cơ sở tri thức của bạn.",
        "total_documents": "Tổng Tài liệu",
        "total_chunks": "Tổng Đoạn Văn bản",
        "storage_size": "Kích thước Lưu trữ",
        "last_updated": "Cập nhật Cuối",
        "document_list": "📚 Danh sách Tài liệu",
        "no_documents": "Không tìm thấy tài liệu. Hãy tải lên một số tài liệu trước!",
        "delete_all": "🗑️ Xóa Tất cả Tài liệu",
        "documents_deleted": "Tất cả tài liệu đã được xóa.",
        
        # About page
        "about_header": "Về Top.Edu",
        "what_we_do": "🎯 Chúng tôi làm gì",
        "what_we_do_description": "Top.Edu giúp sinh viên toàn cầu dễ dàng tìm thông tin chính xác và cập nhật về các trường đại học ở Đông Nam Á. Nền tảng của chúng tôi tổng hợp các tài liệu chính thức của trường và sử dụng AI để trả lời các câu hỏi về chương trình học, học phí, yêu cầu đầu vào và hạn nộp hồ sơ.",
        "who_we_are": "💡 Chúng tôi là ai",
        "who_we_are_description": "Chúng tôi là nhóm những người đam mê giáo dục và AI, cam kết làm cho giáo dục đại học trở nên dễ tiếp cận và minh bạch. Sứ mệnh của chúng tôi là đơn giản hóa quá trình tìm kiếm và cung cấp hướng dẫn đáng tin cậy cho sinh viên muốn du học.",
        "contact": "📞 Liên hệ & Hỗ trợ",
        "supported_languages": "🌏 Ngôn ngữ được hỗ trợ",        
        # Countries
        "singapore": "Singapore",
        "malaysia": "Malaysia",
        "thailand": "Thái Lan",
        "indonesia": "Indonesia", 
        "philippines": "Philippines",
        "vietnam": "Việt Nam",
        "brunei": "Brunei",
        
        # Study levels
        "diploma": "Chứng chỉ",
        "bachelor": "Cử nhân",
        "master": "Thạc sĩ",
        "phd": "Tiến sĩ",
        
        # Budget options
        "any": "Bất kỳ",
        "under_10k": "<10k",
        "10k_20k": "10k-20k",
        "20k_30k": "20k-30k",
        "30k_40k": "30k-40k",
        "over_40k": ">40k",
        
        # Example queries
        "example_complex_1": "Cho tôi xem các trường đại học ở Malaysia cho bằng thạc sĩ với học phí dưới 40.000 tệ/năm",
        "example_complex_2": "So sánh các chương trình kỹ thuật ở Thái Lan và Singapore dưới $15.000/năm",
        "example_complex_3": "Tìm các chương trình MBA ở ASEAN có yêu cầu GMAT và học bổng",
        "example_complex_4": "Các trường đại học ở Indonesia với chương trình giảng dạy bằng tiếng Anh không yêu cầu IELTS",
        "example_simple_1": "IELTS là viết tắt của gì?",
        "example_simple_2": "Sự khác biệt giữa bằng cử nhân và thạc sĩ là gì?",
        "example_simple_3": "Làm thế nào để xin visa du học?",
        "example_simple_4": "Những tài liệu gì cần thiết cho đơn xin học đại học?",
    }
}

def get_text(key: str, lang: str = "English") -> str:
    """Get translated text for a given key and language"""
    if lang in translations and key in translations[lang]:
        return translations[lang][key]
    # Fallback to English if translation not found
    return translations["English"].get(key, key)

def get_language_code(display_name: str) -> str:
    """Convert display name to language code"""
    language_map = {
        "English": "English",
        "中文 (Chinese)": "中文", 
        "Bahasa Malaysia": "Malay",
        "ไทย (Thai)": "ไทย",
        "Bahasa Indonesia": "Indonesian",
        "Tiếng Việt (Vietnamese)": "Tiếng Việt"
    }
    return language_map.get(display_name, "English")