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, ...Setting Separate Skins for Different Languages Setting Separate Skins for Different Languages
Previous
 
Next
New Post
1/8/2015 9:14 AM
 

I've got a good solution for this issue.

Please visit platform.dnnsoftware.ir (username: host, password: dnnhost) and try to change language from English to Farsi. You'll see entire site will switch from left to right.

Here I want to share my experience with you. There are two steps to achieve rtl and ltr layout on a same portal as follow:

 

Step 1: adding class="rtl" to body when selected language is Right To Left

Why: Sometimes attributes like align, float, margin,etc is defined in Javascript files and we need to know page direction to set correct value. Also there are times when we want to override css attributes in right to left languages. This step covers situations like these.

 

How: with a couple of codes to default.aspx.cs (screenshot below):

 

Step 2: Skin.rtl.css, container.rtl.css and module.rtl.css

 By default DNN loads skin.css, container.css and module.css on page. It may happen to RTL languages as well if two following conditions come true:

1- Selected language is Right To Left
2- .rtl.css file exists (e.g. skin.rtl.css exists beside skin.css in skin directory)

 

Please download this file and search for dnnsoftware.ir to see changes.

 
New Post
1/8/2015 10:08 AM
 

Right, that should work too.
But the disadvantage is that you are editing a file that is being overwritten on upgrade  (default.aspx.cs)
You would need to put the code in after each DNN upgrade.
That's why a skin object is a better solution, as that will just stay in place during an upgrade.
Also I would use: CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft to filter for RTL languages

BTW, you could do the same using our skin object using these attributes: IfTextDir="rtl" BodyClass="rtl" FilterBodyClass="True"

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Setting Separate Skins for Different Languages Setting Separate Skins for Different Languages


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