Loading...
 

CKEditor contentsLangDirection by page language

Status
Open
Subject
CKEditor contentsLangDirection by page language
Version
6.x
Category
  • Patch
  • Consistency
Feature
WYSIWYG (What You See is What You Get)
i18n (Multilingual, l10n, Babelfish)
Resolution status
New
Submitted by
ylavi
Lastmod by
ylavi
Rating
(0)
Description

The multilingual/translation support is integrated with the WYSIWYG feature in a way that if you are working in an English interface, the text direction in CKEditor remains LTR even when the page being edited is defined as being in Hebrew, which is RTL. I expect that this applies to any other RTL language.

Similarly, it seems to me (though I haven't tested it thoroughly) that a user working in a Hebrew interface would get RTL behaviour in CKEditor even when editing an English page.

I can only assume that use of the English-language interface for editing Arabic pages and Arabic-language interface for English pages is common, as such combinations are certainly common where Hebrew is involved. The forcing of direction according to interface language rather than page language is likely to be a significant annoyance in all such cases.

The ideal solution would be to make the editor direction dependent on the page language's direction, and only according to the user's language if there is no page language set (there is a CKEditor option which does that - see http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.contentsLangDirection)

Solution

A simplistic hack was added to force the direction to 'ltr' for 'en' page language and 'rtl' for 'he' page language and only if neither of these is matched, to go by the standard logic.

tiki\lib\smarty_tiki\block.textarea.php - line 204 in 6.0
contentsLangDirection: "' . ($prefs['feature_bidi'] === 'y' ? 'rtl' : 'ltr') . '"

tiki\lib\smarty_tiki\block.textarea.php - rough hack for Hebrew RTL and English LTR from Hebrew interface
'. ( !empty($smarty->_tpl_vars['lang']) ? 'contentsLanguage: "' . $smarty->_tpl_vars['lang'] . '",' : '') . '
	contentsLangDirection: "' . ( $smarty->_tpl_vars['lang'] === 'he' ? 'rtl' : ( $smarty->_tpl_vars['lang'] === 'en' ? 'ltr' : ($prefs['feature_bidi'] === 'y' ? 'rtl' : 'ltr') ) ) . '"


For general use it would make more sense to have a "RTL" flag in the language list and refer to that when setting contentsLangDirection, falling back on the "ui" setting for direction when no page language is defined.

Importance
3
Demonstrate Bug
Please demonstrate your bug on show2.tikiwiki.org

 About show2.tikiwiki.org

To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tikiwiki.org instance. To start, simply select a version and click on "Create show2.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tikiwiki.org.

Version: Create show2.tikiwiki.org instance
Rating (deprecated)
(1)
Ticket ID
3782
Created
Thursday 03 February, 2011 17:15:24 GMT-0000
LastModif
Thursday 03 February, 2011 17:15:24 GMT-0000

Attachments

 filenamecreatedhitscommentversionfiletype 
No attachments for this item


Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Group
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend, alert + Social Bookmarking
Terms and Conditions
Theme
TikiTests
Timesheet
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools