مبدّل اللغة التلقائي هو امتداد لـ Visual Studio Code يكتشف اللغة من النص المحيط بالمؤشر ويحوّل لغة الإدخال إلى العربية أو الإنجليزية فقط عند الحاجة.
🎯 لماذا هذه الإضافة؟
الميزة
الوصف
🧠
كشف ذكي - يعتمد على سياق النص القريب من المؤشر
🎯
دقة أعلى - يعطي وزنًا إضافيًا للكلمة عند المؤشر
🔄
سلاسة العمل - يتعامل مع السطر الجديد الفارغ بذكاء
✅
تجنب التبديل الخاطئ - لا يبدّل إذا اللغة الحالية صحيحة
🌍
دعم متعدد الأنظمة - Windows و macOS و Linux
✨ المميزات
1️⃣ كشف ذكي قرب المؤشر
الميزة
📍 يقرأ النص القريب من موضع المؤشر
🔤 يميز العربية والإنجليزية بدقة
🎯 يتجنب قرارات غير دقيقة من السطر الكامل
2️⃣ منطق تبديل ذكي
السلوك
🇸🇦 يتحول للعربية عند الحاجة
🇬🇧 يتحول للإنجليزية عند الحاجة
🚫 لا ينفذ تبديلًا إذا كانت اللغة الحالية صحيحة
3️⃣ دعم متعدد المنصات
المنصة
طريقة التنفيذ
الحالة
🪟 Windows
PowerShell + Win32 API
✅ مدعوم
🍎 macOS
AppleScript / Input Sources
✅ مدعوم
🐧 Linux
gsettings / setxkbmap / ibus / fcitx
✅ مدعوم
📥 التثبيت
📦 من ملف VSIX
الخطوة
الإجراء
1️⃣
حمّل الملف autolanguage-0.0.9.vsix
2️⃣
افتح VS Code
3️⃣
اضغط Ctrl+Shift+P (أو Cmd+Shift+P على Mac)
4️⃣
اكتب Extensions: Install from VSIX...
5️⃣
اختر الملف المحمّل ✅
⌨️ التثبيت عبر الطرفية
code --install-extension autolanguage-0.0.9.vsix
🚀 الاستخدام
🎬 كيف يعمل الامتداد
graph LR
A[تحريك المؤشر أو بدء الكتابة] --> B[تحليل النص القريب]
B --> C{عربي أم إنجليزي؟}
C -->|عربي| D[تبديل للعربية إذا لزم]
C -->|إنجليزي| E[تبديل للإنجليزية إذا لزم]
D --> F[تحديث شريط الحالة]
E --> F[تحديث شريط الحالة]
Auto Language Switcher is a Visual Studio Code extension that detects language from text around the cursor and switches your input language to Arabic or English only when needed.
🎯 Why this extension?
Benefit
Description
🧠
Smart detection based on nearby cursor context
🎯
Higher accuracy with extra weight for the active word
🔄
Smooth editing flow with new-line awareness
✅
Fewer false switches by checking current layout first
🌍
Cross-platform support for Windows, macOS, and Linux
✨ Features
1️⃣ Smart Cursor-Proximity Detection
Feature
📍 Reads text around current cursor position
🔤 Detects Arabic and English accurately
🎯 Avoids noisy full-line decisions
2️⃣ Smart Switching Logic
Behavior
🇸🇦 Switches to Arabic when needed
🇬🇧 Switches to English when needed
🚫 Skips switching when layout is already correct
3️⃣ Cross-Platform Support
Platform
Implementation
Status
🪟 Windows
PowerShell + Win32 API
✅ Supported
🍎 macOS
AppleScript / Input Sources
✅ Supported
🐧 Linux
gsettings / setxkbmap / ibus / fcitx
✅ Supported
📥 Installation
📦 Install from VSIX
Step
Action
1️⃣
Download autolanguage-0.0.9.vsix
2️⃣
Open VS Code
3️⃣
Press Ctrl+Shift+P (or Cmd+Shift+P on macOS)
4️⃣
Run Extensions: Install from VSIX...
5️⃣
Select the downloaded file ✅
⌨️ Install via Terminal
code --install-extension autolanguage-0.0.9.vsix
🚀 Usage
🎬 How the Extension Works
graph LR
A[Move cursor or start typing] --> B[Analyze nearby text]
B --> C{Arabic or English?}
C -->|Arabic| D[Switch to Arabic if needed]
C -->|English| E[Switch to English if needed]
D --> F[Update status bar]
E --> F[Update status bar]