Language & Direction Controls
Implementation Guide
// Initialize with specific language and direction
const chat = new quikchat('#chat', onSend, {
lang: 'ar',
dir: 'rtl',
translations: {
'ar': {
sendButton: 'إرسال',
inputPlaceholder: 'اكتب رسالة...',
titleDefault: 'دردشة'
}
}
});
// Change language dynamically
chat.setLanguage('he', {
sendButton: 'שלח',
inputPlaceholder: 'הקלד הודעה...',
titleDefault: 'צ\'אט'
});
// Change direction
chat.setDirection('rtl'); // or 'ltr'
✅ Supported Features
- Dynamic language switching
- RTL/LTR text direction
- Custom translations
- Per-message alignment
- Locale-aware UI
🌐 RTL Languages
- Arabic (العربية)
- Hebrew (עברית)
- Persian (فارسی)
- Urdu (اردو)
- Pashto (پښتو)
📝 Translation Keys
sendButton
inputPlaceholder
titleDefault
- + custom keys