Multilingual blog.
-
Can my blog have dual languages, so I can have posts in Arabic and in English? When I tried to do so now ( since one is from left to right and the other is from right to left) I can get them both to be properly published.
The blog I need help with is: (visible only to logged in users)
-
Hey!
So, technically you can’t really have a “multilingual blog”, meaning that there is no feature or option for anything like that.
That’s the bad news, the good news is that I think I have come up with a hack that will let you post English content in left to right direction.
So, if you add this to your site’s CSS:
.category-english { direction: ltr; }Every post you have published, or publish, under the “English” category, will be formatted left-to-right. We could add something similar for an “Arabic” category:
.category-arabic { direction: rtl; }The trick here is that posts are marked with a “class” that reflects their Category, so for example, your current posts under “About Life” have the class “category-about-life” (under case, dashes instead of spaces).
You can take the code above and use a different category if you prefer. So, if you want to make all your “About Life” posts be rtl, you would change the above code to:
.category-about-life { direction: ltr; }And so on.
To avoid confusions, and give you more flexibility, I would advice you to create two new categories: English and Arabic, and use them for the only purpose of determining the text direction.
Does that make sense?
-
-
- The topic ‘Multilingual blog.’ is closed to new replies.