New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for RTL languages #205
Comments
I'll see what I can do |
Is this applicable on an account basis or per feed? |
It is per post. Some feeds post content in more than one language. You can take a look at this example: http://tinyurl.com/rtlfeed |
How am I going to detect the post needs rtl? |
Based on the language tag or attribute:
... Both the title and the summary of that entry should be shown in RTL.
|
I also examined a few other RTL blogs and it seems that on some occasions, they are misconfigured as if they are in English (language code "en" is returned in the feed), but when I browse them in Google Reader, it shows them in RTL. It seems like on top of all the above, we need a 4th rule that predicts the language based on the content. However, let's start with the above three. |
Indefinitely needed, current state is not usable for Persian/Arabic/Hebrew and other RTL languages :( |
I like this method, I'll draft a first version using this. |
Also there is another cleaner solution based on NLP https://code.google.com/p/language-detection/ This library can detect language per contents then rtl style can be used if detected languages is rtl. Also this is list of RTL languages ar|arc|arz|bcc|ckb|bqi|dv|fa|fa-af|glk|ha|he|kk-arab|kk-cn|ks|ku-arab|mzn|pnb|prd|ps|sd|ug|ur|ydd|yi |
I referenced the wrong issue in the commit message : 9568ccf |
WOW! |
I'll deploy it in a few minutes, let me know what you think. |
|
https://code.google.com/p/closure-stylesheets/ can flip styles for your CSSs so only thing I think is needed is generating an RTL version of your CSSs and prefixing .rtl on them and including it on rtl pages. (This is also useful for commafeed fully localization for RTL languages) |
Also there is another solution, I can manually make needed .rtl CSSs. Is this a better solution? |
Probably, we'll have better control of what happens. |
9568ccf has fixed most of the problem, but not all of it. Whenever the entry only has a title (that is the summary is blank), the directionality of the title should be determined based on the language detected for it using BidiUtils. Right now, it always flows LTR. |
I did this for improving styles #240 |
I have. #240 deals with the stylesheets. My question is about when the "rtl" class should be applied. Currently, it is only applied if the entry has a summary, and the language of that summary is determined to be RTL. What is missing is if the entry doesn't have a summary (e.g. the content is just an image, a video, or even blank), but has a title that is, say, in Arabic. At this time, that title is shown LTR, because the appropriate classes are not added to it. |
I agree with huji. Also in another situation, if a post contains a lot of sample codes (they are usually wrapped with <div dir="LTR" />, e.g. http://feeds2.feedburner.com/PersianBloggers/Programming ) and less Persian comments, it must be showed in RTL otherwise its Persian comments would be unreadable. This shows statistical way for determining direction is not good enough or in the other word it must be used as a fallback detector. So a solution just like what huji said at #205 (comment) is needed, though 9568ccf will work at most cases and good enough for now IMO. |
I think with a3cc4ee huji's concerns is resolved so please ignore my previous comment and close this bug if you want. Other improvements can be done later (when we see a real case for it). Thanks. |
Please add support for content in right-to-left languages (such as Arabic, Persian, Hebrew, etc.) and by support I mean the content of those entries should be wrapped in a DIV which has a style of "direction:rtl"
The text was updated successfully, but these errors were encountered: