]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/PO_and_RTL_support/comment_4_906ed30ea85cf2910603d3ca94b7e46c._comment
Added a comment
[ikiwiki.git] / doc / forum / PO_and_RTL_support / comment_4_906ed30ea85cf2910603d3ca94b7e46c._comment
1 [[!comment format=mdwn
2  username="fr33domlover"
3  ip="46.117.109.179"
4  subject="comment 4"
5  date="2014-09-17T11:22:57Z"
6  content="""
7 > Could you test whether your tip works with \<div dir=\"rtl\"> or something, please?
8
9 Sure, I will check that soon. I think it does, I just tried here in ikiwiki. Just curious, why is
10 div preferred? IIRC I use \"class\" there after looking at some existing templates. But
11 I'm not an expert, especially not in CSS. Would that be used as an HTML4 parallel of the dir attribute?
12
13 As to that website with the patch, the problem is that the text is aligned to the left. When
14 I type Hebrew in an LTR page, it already shows more or less correctly - English words are
15 shown in correct letter order thanks to the bidi algorithm. The issue seems to be aligning
16 to the right - that is what my tip does. Maybe the direction setting in the CSS also has other
17 effects - I just know it works :-)
18
19 I'll happily help with the tests. I also have a test page on my wiki which uses many ikiwiki
20 features, to demonstrate how they all look in RTL. Test case ideas:
21
22 - Page in RTL (e.g. Arabic) with an LTR paragraph (e.g. English)
23 - Page in RTL with LTR paragraph in the same language (e.g. fancy way to write a poem)
24 - Page in LTR (e.g. English) with an RTL paragraph (e.g. Hebrew)
25 - Page in LTR with RTL paragraph in the same language (poem again)
26 - Translated page - master language is LTR, slave is RTL
27 - Translated page - master language is RTL, slave is LTR
28 - Master LTR page has RTL paragraph, all slaves have it RTL too regardless of their global direction
29 - Master RTL page has LTR paragraph, all slaves have it LTR too regardless of their global direction
30
31 An example for the last 2 tests is an English master page about linguistics which has a paragraph in some
32 RTL language that is being studied, and all slave pages must keep that paragraph intact - both the
33 text itself and its RTL direction. But the rest of the page can be translated and correctly made RTL when
34 translated to RTL languages.
35
36 This gives me another idea - most of the time what you actually mean is to reverse the direction: RTL
37 becomes LTR and vice versa. When writing some fancy poem, that's what you probably want. But in the
38 previous example, the direction should not be reversed - so there should maybe be two kinds of direction
39 modifiers:
40
41 1. Dynamic (the default) - You write e.g. a master page in LTR and some RTL paragraphs. an RTL translation
42    automatically reverses directions, RTL <=> LTR.
43 2. Fixed - this is like my tip, e.g. An RTL paragraph in an LTR page has a fixed direction set, which is kept even in
44     translations for RTL languages - the page in general is reversed, but that paragraph is not.
45
46 Another very useful thing (at least to me) would be an option to have different wiki pages/section with
47 different master languages. I have sections in English and sections in Hebrew, which makes the PO
48 plugin a problem to use, unless I keep one of these sections untranslated.
49 """]]