16 Replies Latest reply: Sep 5, 2012 11:34 AM by hen3ry RSS

    DW CS5 rtl text snippits within ltr pages

    hen3ry Community Member

      DW CS5 on MacOS 10.7.x

       

      I sometimes need to embed short snippets of right-to-left text in pages that are predominently left-to-right.

       

      Editing around these insertions is often very difficult.  Design View and Code View fall out of synch.   Once the snippets are inserted, successful adjustments often depend on placing the editing cursor at the opposite end of the text and editing there.  Yeah,  it is really difficult confusing editing text that isn't visible at the cursor.

       

      Since most of the mixed material comes to me in word-processing document form, I've tried inserting

       

           <span DIR="RTL"> ... </span>

       

      around each snippet and

       

          <span DIR="LTR"> ... </span>

       

      around everything in the original .DOC or .rtf, etc., then copying-and-pasting from that dic ti  to Code View.  This seems to help.

       

      Suggestions for best results?

       

      TIA

        • 1. Re: DW CS5 rtl text snippits within ltr pages
          mytaxsite.co.uk MVP

          I sometimes need to embed short snippets of right-to-left text in pages that are predominently left-to-right.

           

           

          you can use CSS to do exactly what you want to do.  I am of course assuming you want to reverse the text.

           

          1) Use this CSS:

           

           

          span {

              direction: rtl;

              unicode-bidi: bidi-override;

              font-size: 300%;

          }

           

          2) Now use this HTML in your body section:

           

           

          <span>Use this text as your test</span>

           

          Save the file and preview in your browser - ideally FF 14 or IE9.

           

          Post back and let us know what happened.

          • 2. Re: DW CS5 rtl text snippits within ltr pages
            Ken Binney MVP

            Hi-

             

            Is editing easy in code view?

             

            My old version of DW shown easily edited text in both design and code views.

            Obviously it reverses in browser view. I take it views in your version are not like mine?

            • 3. Re: DW CS5 rtl text snippits within ltr pages
              hen3ry Community Member

              Perhaps I was too obscure.

               

              The majority  ltr text is English. The rtl text snippets are Hebrew.   The pages are explanations in English of  Hebrew words and phrases.   The correct ordering must be preserved in both.

               

              I have difficulties editing in both Code and Design View.   Perhaps Code View is a little more reliable.  In both cases, DW seems to have trouble in the vicinity of the Hebrew inserts.  Placing the cursor HERE seems to have the effect of placing the cursor THERE.    Since I can't see exactly what is going on this is approximate:  the HERE-THERE confusion seems to be a "mirror" swap around the Hebrew insert.

               

              As a tekkie, I know this isn't an easy implementation, mixing LTR and RTL.  On the other hand, the other text-handling Mac apps I use (TextEdit, LIbreOffice)  have no or only minor trouble with such instances.

              • 4. Re: DW CS5 rtl text snippits within ltr pages
                Nancy O. MVP

                Use a 2 column table.

                 

                 

                <!doctype html>
                <html>
                <head>
                <meta charset="utf-8">
                <title>English / Hebrew</title>
                
                <style type="text/css">
                table {
                width: 700px; 
                padding:0; 
                background-color: #696;
                font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
                }
                
                th {
                color:#FFF;
                font-size: 18px;
                text-align:left;
                padding:0 18px;
                text-align:center;
                }
                
                td {
                background-color:#FFF;
                height: 35px;
                padding-left:18px;}
                
                td:nth-child(even) {
                direction: rtl;
                unicode-bidi: bidi-override;
                }
                
                </style>
                </head>
                
                <body>
                
                <table>
                <tr>
                <th>English</th> <th>Hebrew</th>
                </tr>
                <tr>
                <td>Some English text goes here...</td>  
                <td>Some Hebrew text goes here....</td>
                </tr>
                <tr>
                <td>Some English text goes here...</td>  
                <td>Some Hebrew text goes here....</td>
                </tr>
                <tr>
                <td>Some English text goes here...</td>  
                <td>Some Hebrew text goes here....</td>
                </tr>
                </table>
                </body>
                </html>
                

                 

                 

                 

                Nancy O.

                • 5. Re: DW CS5 rtl text snippits within ltr pages
                  hen3ry Community Member

                  Thanks for your suggestion, but the text is continuous;  the RTL Hebrew text is in-line in a pargraph of English text.   For example, if I replaced the word "continuous" in the previous sentence with a word in Hebrew.

                  • 6. Re: DW CS5 rtl text snippits within ltr pages
                    hen3ry Community Member

                    Let me update my previous post with what I hope is a clearer explanation and an example:

                     

                    When editing  a short snippet of  Hebrew (a RTL, Right-to-Left script) in continuous English-Latin (LTR, Left-to-Right)  text,  I find DW CS5 (MacOS 10.7.x) editing is very difficult in both Code View and Design View. Specifically, placing the text insertion point here results in editing there.   Take this synthetic example, in a new HTML document, with capital Latin characters representing Hebrew characters:

                     

                    In hac habitasse platea dictumst. Fusce imperdiet tempor tortor, nec iaculis lectus

                    hendrerit at. Donec sollicitudin magna vitae libero feugiat dignissim. GFEDCBA. Cras in magna

                    ac arcu pretium fringilla non in erat. Nullam facilisis interdum nisl nec accumsan.

                     

                    Placing the insertion point between "F" and "G", e.g. and typing (or pasting) a single character, say Z, results in the Z appearing between "A" and "B". And vice-versa. Schematically, using the vertical bar to represent the insertion point:

                     

                           GFEDCBA -->  G|FEDCBA --> "Z"  -->  GFEDCBZA

                     

                            GFEDCBA -->  GFEDCB|A --> "Z"  -->  GZFEDCBA

                     

                    Note:  I tried using a new user account.  Same results.

                     

                    Do you get better results in the same or a similar environment?  Can you confirm my results?

                     

                    Work-arounds?  Fixes?

                     

                    I can repeat the same operations in TextEdit 1.7.1, LibreOffice 3.5.5.3, and JEdit 4.3.2. --all latest or very recent versions-- with no problem.

                     

                    TIA

                    • 7. Re: DW CS5 rtl text snippits within ltr pages
                      Ken Binney MVP

                      Promise not to laugh, but it's an idea ----

                       

                      Make a copy of your CSS stylesheet

                      Name the copy the same but add an X at the end of the file name.

                      Edit the relevant rule to remove the RTL and change the text color and enlarge the size.

                       

                      When you need to edit, just add a temporary X to the CSS link

                      You can now easily spot your target text in design view and make the edit

                       

                      When finished editing, just remove the X up top, ave and preview.

                       

                      Now you can laugh!

                      • 8. Re: DW CS5 rtl text snippits within ltr pages
                        hen3ry Community Member

                        Ken Binney:

                         

                        Thanks for your response.    I DID ask for a workaround!  (A specific reply further down.)

                         

                        - - -

                         

                        I've continued to search and found some additional relevant material:

                         

                        1) This page contains some well-thought-out  examples of inserting RTL snippets in LTR Latin English text.  See the 2 x 2  table about 1/3 of the way down,  just below the text, "This example shows how browsers that support bidirectional text behave with different DIR attribute settings."

                         

                        Note the reversals (character and right- versus left-alignment) in the right column due to using dir="LTR" and dir="RTL" directives, which are shown in the left column.    What I see  makes intuitive sense to me.  It looks the same in recent versions of Firefox, Safari, and Chrome.  Which I guess means that these modern browsers all support bidirectional text.

                         

                        I  saved this page into a local file and opened it in DW.  Hmmm,  the reversals do NOT occur.  The two sentences in each of the right-hand boxes are identical.   Which, to me, implies: 

                         

                        DW CS5 Design View does NOT support bidirectional text. 

                         

                        (A possibly equivalent statement:  DW CS5 ignores "dir=" directives.)

                         

                        2) I should have mentioned from the start that I'm using Unicode throughout.    I think MacOS uses Unicode, and that's why RTL snippets inserted in LTR Latin English text work correctly in the Mac apps I checked.   I'm guessing the underlying mechanism is described here.

                         

                        Whew!  That's really a lot of industrial-strength tekkie material, but for this discussion, I think it boils down to this:  Unicode-capable apps insert and detect non-printable "Bidi Controls" indicating text direction.   I can maintain a Hebrew snippet in (say) LibreOffice: it is fully Unicode-capable.

                         

                        Is DW CS5 fully Unicode-capable?

                         

                        3) I found this article, which specifically addresses  your workaround.   Again, some high-powered tekkie material, but the relevant bottom line seems clear enough:  don't  use CSS to control text directionality, essentially because that's too far downstream.

                         

                        4) The definitive document on this issue might be this one from W3C.

                         

                        Much more dense tekkie material, unusually well-explained, but:  My head is spinning!   For the moment I'm going to concentrate on one section, The "missing space' phenomenon", here.

                         

                        I saved the markup for the second example (circle-arrow link at right), which I presume is completely valid.  When I tried to edit in and around the Hebrew text in DW CS5, I observed the same problems:  putting the insertion point here, resulted in editing there.

                         

                        - - -

                         

                        Bottom line:  The evidence I've found so far is that DW CS5 does not have full bidirectional text support and/or does not fully support Unicode.   If so, I think that this is more than sufficient to explain the poor editing results I'm seeing.

                         

                        Here's a desperate hope:   The problems I'm observing can be fixed by flipping a hidden DW switch to activate full bidirectional text/Unicode operation.

                         

                        Am I interpreting the evidence correctly?   Please feel free to correct me, prove me wrong, and suggest alternatives.  Even better, please --anyone-- suggest a simple way I can get back to my  actual work,  which requires embedding RTF snippets in LTR text flows, with normal editing capabilities.

                         

                        TIA

                        • 9. Re: DW CS5 rtl text snippits within ltr pages
                          David_Powers ACP

                          hen3ry wrote:

                           

                          Here's a desperate hope:   The problems I'm observing can be fixed by flipping a hidden DW switch to activate full bidirectional text/Unicode operation.

                          Not in Dreamweaver CS5 nor in the English version of Dreamweaver. You need the Middle Eastern and North African version of Dreamweaver CS6. See http://helpx.adobe.com/content/help/en/dreamweaver/using/arabic-hebrew-text.html.

                          • 10. Re: DW CS5 rtl text snippits within ltr pages
                            Ken Binney MVP

                            On this topic, I trust that you are probably the most well-read guy in this forum, so I trust your conclusions.

                            When confronting these rare issues, after a certain amount of non-billable investigation, I tend to cut my losses and go with whatever works.

                             

                            In simpler language, I admit to choosing workability over elegance.

                             

                            Wishing you the best -

                            • 11. Re: DW CS5 rtl text snippits within ltr pages
                              hen3ry Community Member

                              Perhaps you might want to get some perspective and consider revising this reply?

                              • 12. Re: DW CS5 rtl text snippits within ltr pages
                                hen3ry Community Member

                                Ken:

                                 

                                Thanks for your kind words, to which I can only respond "Aw, shucks".  <grin>

                                 

                                I am a tekkie, but this mostly reminds me about how much computer technology I simply don't --and can never-- understand. 

                                 

                                Yeah, in my former contracting career I definitely learned about "workability over elegance".  Not always an easy choice.  Yikes: I have spent a huge amount of time correcting my early, extremely naive markup.  

                                 

                                I have not yet found anything better than adapting as best I can to the cursor here, effect there "feature".    I will try in the future to try to perfect the source text before placing it into DW, but my workflow emphasizes revising the content, sometimes heavily, over the lifetime of some pages. It's coverage of on-going research.

                                 

                                I'm also going to try increasing the font size in Code View, which seems a bit more stable, and see if that helps a bit.

                                 

                                It woud be a shame is to find myself cutting back on the number of RTL snippets inserted, as these give some important richness to the content.

                                • 13. Re: DW CS5 rtl text snippits within ltr pages
                                  David_Powers ACP

                                  hen3ry wrote:

                                   

                                  Perhaps you might want to get some perspective and consider revising this reply?

                                  You asked if there was some hidden DW switch to enable full bidirectional text/Unicode operation. The question of Arabic/Hebrew support comes up in these forums from time to time. It has always been one of Dreamweaver's weak points. I don't use Arabic or Hebrew, but from what I understand, Adobe has made considerable efforts to improve support in CS6. However, it requires the Middle East and North African version.

                                   

                                  I can understand your frustration regarding Unicode support. For many years, I developed websites in Japanese and Korean. However, although Dreamweaver supported both languages, it wasn't until Dreamweaver 8 that the English version of the program was capable of creating pages using Asian scripts. To create a page in Japanese, I needed to change the code page in my operating system and reboot. Then to revise a page in Korean, I had to do the same. It was an extremely tiresome process. So, for a long time, I used two separate computers: one running a Japanese OS and the other running in English. It was a great relief when Dreamweaver finally managed to support the Asian scripts I needed.

                                   

                                  The difference is that  although Japanese is normally written top to bottom, right to left, web pages are written left to right. Clearly, overcoming the right to left issue has proved more problematic for Dreamweaver. I hope that for your benefit and others that Adobe can resolve the issue. But I assure you that my reply was written in the spirit of trying to help, and not just some flip comment telling you to update to the latest version of Dreamweaver.

                                  • 14. Re: DW CS5 rtl text snippits within ltr pages
                                    hen3ry Community Member

                                    David Powers:

                                     

                                    Thank you very much!

                                     

                                    About the hidden switch:  I did not really expect such a switch exists.   Thanks for acknowledging that "Arabic/Hebrew support ... has always been one of Dreamweaver's weak points,"   and that work remains to be done in this area.  This information allows me to stop looking for what I'm doing wrong, causing editing to be  so crazy.

                                     

                                    Do I understand  correctly that using DW 8, you could build sites in Japanese or Korean, but you still had to reboot each time you switched between these languages?  Or maintain one computer for each?   If so, my sympathies to you!   I know that everyday Japanese can contain as many as 4 distinct scripts (Kanji, Katakana, Hiragana, and Romaji) and can flow left-to-right or top-to-bottom or both -- in the same document.   I'm guessing that DW 8's limitations in supporting non-Latin scripts were due at least in part to OS limitations way back then.  

                                     

                                    According to this Wikipedia article, DW8 was released in Fall, 2005.   (Is that about right?)  A lot of progress has been made since then.  I haven't followed Windows in this respect, but I'm fairly certain MacOS has supported Unicode, fully --including bidirectionality-- for quite a while now.

                                     

                                    - - -

                                     

                                    For a U.S. DW user needing to include short RTL  text snippets in LTR Latin web pages without crazy editing problems ,  the only current alternative seems to be buying the Middle East and North African ( I'll abbreviate: "ME/NA") edition, correct?

                                     

                                    If so, I can see some difficulties:

                                     

                                    1) Is there an upgrade path from US DW CS5 to  ME/NA  CS6, or does this change of path require a full-price purchase of  ME/NA CS6?   Are the US and ME/NA upgrade paths merged or distinct, now and in the future?

                                     

                                    My results:  The direct "Buy" link on shop.adobe.com lists only US DW versions where I find a upgrade from DW CS5 to DWCS6 Mac for US$249.00.   I found a different page that offers English, French, and Spanish CS6 upgrades for the same price.  Eventually I found a third  "Adobe Store - Middle East and North Africa" store page that offers English, English-Arabic, or French-Arabic upgrades for Mac at US$512.29.  (Does the "English-Arabic" version support Hebrew equally well?  If so, why isn't this support explicitly offered?) Yet another store page I found seemed to indicate  no upgrade path exists from CS5, and quotes full price of  US$1,180.67.    Am I missing something?

                                     

                                    2)  Is it practical for an individual who does not speak a ME/NA language to fully use and maintain the ME/NA DW?   In other words, is the English-Arabic --and presumably, English-Hebrew-- version bilingual in _all_ respects?

                                     

                                    3)  Is it practical for an  customer in the U.S. to get support in the U.S. for a product marketed to the ME/NA countries?  Will I need to contact the regional support organization in, say,  Cairo or Tel Aviv?  If so, do their personnel speak fluent English?   International 800 number?   Conversely, if I own a ME/NA product, will U.S. support help me?  

                                     

                                    4) In terms of user-to-user support, e.g. this forum, is it reasonable to expect that others will find their way here to discuss wrinkles in ME/NA bidirectional support?    I'm not going to be able to be able to do much in a Hebrew- or Arabic-language forum.

                                     

                                    - - -

                                     

                                    Thank you for your direct and forthright comments. 

                                     

                                    I assure you my purpose is to get the best possible web development tools operating at maximum efficiency for my work -- and to get back to that work. 

                                     

                                    I'll add that I have always had strong tendency to push my computing tools to their extreme limits. This can be a challenge for vendors, but it does not have to be a conflict.  I've done my best to keep my comments positive, or at least neutral.   The non-technical questions posed above are not directed at you, but presented for input from all. They do reflect  some difficulties I've had with the Adobe Store in the past as well as my honest confusion in navigating the Store today -- and a desire to not spend money unnecessarily.

                                    • 15. Re: DW CS5 rtl text snippits within ltr pages
                                      David_Powers ACP

                                      These are questions that can be answered only by Adobe. I have contacted an Adobe member of staff, who I hope will be able to put you in touch with someone who knows the answers.

                                      • 16. Re: DW CS5 rtl text snippits within ltr pages
                                        hen3ry Community Member

                                        Evidently ... not.

                                         

                                        Thanks for your efforts, anyway.