www.ruby-lang.org
www.ruby-lang.org copied to clipboard
What is the proper way to load an extra CSS file?
I am working on translation the website to Arabic, which is Right-to-left language. For that I need to customize the CSS to load the pages in the proper format.
Thanks.
Hi @mabras!
of course we always appreciate contributions, and an Arabic translation would be great.
But... before you start translating, you should be aware that we require a team of translators/maintainers for a new language. A new translation is a big effort, initially and also on the long run (translation of release and security announcements, keeping up to date with changes). It is also much work for us maintainers, and because of bad experiences I am not inclined to undertake all the setup and reviewing work unless I'm confident the new translation is taken care of on the long run.
So first we need a team of translators.
In case ar is accepted, the most important thing is to start with small pieces and get early feedback.
If you want to get an impression on what steps are involved in a site translation process, see for example #214.
Regarding your original question, for testing on your local machine I suggest to add
{% if page.lang == "ar" %}
<link rel="stylesheet" type="text/css" href="/stylesheets/rtl.css">
{% endif %}
in _layouts/default.html, after loading the other stylesheets, and add an rtl.css file that has all the right-to-left stuff.
But... before you start translating, you should be aware that we require a team of translators/maintainers for a new language. A new translation is a big effort, initially and also on the long run (translation of release and security announcements, keeping up to date with changes). It is also much work for us maintainers, and because of bad experiences I am not inclined to undertake all the setup and reviewing work unless I'm confident the new translation is taken care of on the long run.
Can you reconsider the requirement of team? You see, we need to let ruby spread across Arab people and there is no need to translate the news or security updates for now (it is for advanced users anyway).
Please make an exception?