Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Right To Left DotNetNuke SiteRight To Left DotNetNuke Site
Previous
 
Next
New Post
7/31/2011 1:34 AM
 
DotNetNuke does not Support Right To Left Site when Language is RTL Direction.The whole directions, floating, margion, padding, text aligning..etc are resident at the css files like portal.css, default.css, module.css, skin.css and many many more.Suppose that we create two css files for each direction. For example, portal_ltr.css for LTR Languages and portal_rtl.css for RTL Languages like arabic.How could this implemented with 3 code lines and forget all html/css modifications?All css files are loaded dynamically which is good news using a method called PageBase.RegisterStyleSheet which takes 3 parameters one of them is our target "styleSheet".At this method we can add the direction to the stylesheet parm using replace methodLike this: -------------------------------string Direction = CultureInfo.CurrentCulture.TextInfo.IsRightToLeft ? "rtl" : "ltr";var newstyleSheet = styleSheet.Replace(".css", string.Format("_{0}.css", Direction));Nice, Suppose you forgot to change the css file name like: default.css to default_rtl.css.then your page or module will be loaded without the style and .... you know what happened.Before loading newstyleSheet file we must check if it exists or not.Like This: -------------------------------------------if (File.Exists(page.MapPath(newstyleSheet)))styleSheet = newstyleSheet;Now Build "DotNetNuke.Library" Project & replace your site with the new DotNetNuke.dllFor a testing,Go the Default Portal Folder & create new css file named default_rtl.css then rename default.css file to default_ltr.cssBrowse your site & try to find default_ltr.css word in the page source that's if your language is LTR Direction.

Loai Isaied
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Right To Left DotNetNuke SiteRight To Left DotNetNuke Site


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out