kentico 10 diffrent stylesheet for diffrent language

hassan kalach asked on September 26, 2017 09:41

so i have a website wich has multi language but since one is arabic rtl and the othe ris english ltr , i need some extra stylesheet for the specific language how can i do that ?!

Correct Answer

Matt Nield answered on September 26, 2017 10:45

Hassan, have you tried applying a separate master page for the different language layout? In the past, I've typicall needed more thant CSS changes alone to deal with RTL (depending on the complexity of the design of cource).

If you read Developing unique page templates for specific languages, you should see that you can create alternate versions per-language (including the master template) and then modify the template Header tab to add a reference to the stylesheets or specific styles for RTL.

1 votesVote for this answer Unmark Correct answer

Recent Answers


hassan kalach answered on September 26, 2017 11:22

thank you that made it work so is there a way to prevent repeaters from looping throught both website data ( like i have arabic and english pages the repeater now loop thorught both of them on both the website versions)i dont want that to happen

0 votesVote for this answer Mark as a Correct answer

hassan kalach answered on September 26, 2017 11:35

its okay it look likes the repeater has the option not to combine with default culture setting now its working great

1 votesVote for this answer Mark as a Correct answer

Matt Nield answered on September 26, 2017 11:42

I'm glad to hear that helped. As for limiting the repeaters, yes this is possible by specifying the Current culture in the data source.

0 votesVote for this answer Mark as a Correct answer

Amit Srivastava answered on September 26, 2017 11:57 (last edited on September 26, 2017 12:01)

Hi Hassan,

you can do that using same template for all language also.

add a cssStylesheet webpart in master page and use below macro condition in webpart enable field.

{% LocalizationContext.CurrentCulture.CultureCode == "en-US" #%}

in above macro en-US means your language code in which language you want to apply this stylesheet.

and use stylesheet path like below - /CMSPages/GetResource.ashx?stylesheetname=Dutch

Dutch is stylesheet code name.

Hope it will help and also it will be light weight.

Thanks,

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.