Hebrew support on the forum

Discussion in 'Closed' started by Gags, Jun 13, 2015.

  1. Gags
    Offline

    Gags Donator

    Joined:
    Nov 14, 2013
    Messages:
    1,467
    Likes Received:
    939
    Location:
    Israel
    Hebrew and I believe other languages are starting from the right to the left instead to the left to the right and I've tried to Ctrl + Shift but besides the preview box it doesn't actually work. It would've been nice to have a support on it because every time I combine Hebrew and English it just really messes up the sentence and it can get quite confusing :'\ I know you got a lot on your mind and I'm not saying this is a priority but it should be something nice to consider in the future if it doesn't really bothering you. I don't even know if it's possible with this system..
     
  2. Chokladkakan
    Offline

    Chokladkakan Web Developer

    Joined:
    Feb 2, 2014
    Messages:
    421
    Likes Received:
    986
    I am not convinced I even understand what you are asking for. What would right-to-left script support entail?
     
  3. Gags
    Offline

    Gags Donator

    Joined:
    Nov 14, 2013
    Messages:
    1,467
    Likes Received:
    939
    Location:
    Israel
    The current script doesn't allow you to write Hebrew the way it's meant to be written, and when combining it with English it's just making a mess. Take this for example:

    Wrong way:
    אפשר להיכנס לFM דרך כפתור הTrade.
    Right way:
    [​IMG]

    I wrote "You can enter the FM through the Trade button". What I'm asking for is to make CTRL + Shift functional, and to not display letters starting from the right only when you're in preview-text-mode but after you post them as well. Another example (top is how it is now, bottom is how it's suppose to be):
    [​IMG]
     
  4. Chokladkakan
    Offline

    Chokladkakan Web Developer

    Joined:
    Feb 2, 2014
    Messages:
    421
    Likes Received:
    986
    How's that?

    אפשר להיכנס ל‫FM דרך כפתור הTrade.

    The solution is fairly simple; you have to tell the browser that the text is to be displayed this way. For this purpose, I simply added a 'RIGHT-TO-LEFT EMBEDDING' (U+202B) Unicode character.

    Then you can of course right-align it by using [right] as appropriate.


    אפשר להיכנס ל‫FM דרך כפתור הTrade.

    As to Ctrl+Shift: that's just a sequence of keys telling your operating system to change its input settings.
     
    Last edited: Jun 13, 2015
  5. Gags
    Offline

    Gags Donator

    Joined:
    Nov 14, 2013
    Messages:
    1,467
    Likes Received:
    939
    Location:
    Israel
    Is there a certain action I should take to do that or you've already handled it? I'm sorry I understand nothing about this... and also will left-middle-right buttons be introduced somewhere the future? I'm not really into messing with codes...
     
    Nessi likes this.
  6. Chokladkakan
    Offline

    Chokladkakan Web Developer

    Joined:
    Feb 2, 2014
    Messages:
    421
    Likes Received:
    986
    Buttons to align text to the left, middle or right have always been available in the editor. It's the little symbol between the buttons for links and the buttons for lists.

    You will have to enter said Unicode character before your text in order to tell the browser that the text is supposed to be read from right to left. If such a control character isn't present, there is no way for the browser to know! How you enter such a character depends on your operating system (though I would've thought it did it for you—apparently not!); in Linux/Unix based systems you press Ctrl+Shift+u and then enter the hexadecimal code for the character—202B in this case—whereas in Windows I'm given to understand you need to press and hold Alt, after which you press + on the numpad and then enter the code.

    Possibly this can be made simpler or even automatic, I don't know; I rarely deal with bidirectional input.
     
  7. Gags
    Offline

    Gags Donator

    Joined:
    Nov 14, 2013
    Messages:
    1,467
    Likes Received:
    939
    Location:
    Israel
    Oh wow, I never noticed that! thank you. In office/word there are 2 buttons that let you choose if the text direction should be read from right to left / left to right, and it also fixes misplaced dots and commas, would it be possible to implant these into our system? I think this is how they look like: [​IMG]
     
  8. Chokladkakan
    Offline

    Chokladkakan Web Developer

    Joined:
    Feb 2, 2014
    Messages:
    421
    Likes Received:
    986
    I've implement some BBCode that forces the text within to read from right to left. I am reluctant to add a button to the editor, however; very few people would have a meaningful need for it and because of this it would serve mostly to clutter an editor that already has quite a lot of buttons.

    Have an example:
    Code:
    [right][rtl]אפשר להיכנס לFM דרך כפתור הTrade.[/rtl][/right]
    Which yields:
    אפשר להיכנס לFM דרך כפתור הTrade.
     
  9. Gags
    Offline

    Gags Donator

    Joined:
    Nov 14, 2013
    Messages:
    1,467
    Likes Received:
    939
    Location:
    Israel
    מזל טוב לנס על רמה 200!
    Thank you, I'm gonna save this code and use it when it's needed c:
     
  10. Nessi
    Offline

    Nessi Donator

    Joined:
    Jan 22, 2014
    Messages:
    2,301
    Likes Received:
    16,171
    Gender:
    Male
    Location:
    Israel
    Country Flag:
    IGN:
    LuckyLook
    Level:
    200
    Guild:
    #Fryslan
    LOL
    תודה רבהההההה
     
    ginwolf and Mrkaren like this.

Share This Page