javascript-tutorial / server

Server for the Modern Javascript Tutorial
https://javascript.info
Other
452 stars 138 forks source link

What is the proper way to load an extra CSS file? #47

Closed Goudarz closed 5 years ago

Goudarz commented 5 years ago

I am working on translation to Persian, which is Right-to-left language. For that, I need to customize the CSS to load the pages in the proper format.

iliakan commented 5 years ago

Let me add it for you, as an example. What is needed and where?

Goudarz commented 5 years ago

I want to put the rtl.css file in the head tag.

iliakan commented 5 years ago

1) Will your rtl.css also work for Arabic? Or it's Persian only? 2) Can it be in Stylus (preprocessor) format? rtl.styl

Goudarz commented 5 years ago
  1. Works for all RTL Direction languages: Persian, Arabic, Hebrew , etc.
  2. Yes, I can.
iliakan commented 5 years ago

I added rtl.styl for fa language.

But it requires the server language to exist. You need fa.yml at the same places where en.yml exists, and then ./edit fa fa to run the server in Persian.