SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Thread: Arabic

  1. #1
    SitePoint Member
    Join Date
    Aug 2012
    Location
    London
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Arabic

    Hello,

    I now have the opportunity to expend my website into Arabic, but I have a major problem Western text is Left to right whereas Arabic is Right to left. When I copy the text sent to me in Arabic, it copies the text wrong. The template start as below...

    <!doctype html>
    <html>
    <head>
    <meta charset="UTF-8">
    <meta http-equiv="content-language" content="ar">

    I have been informed, maybe misinformed, that within HTML 5 the last line above is not valid, also the DIR= is also redundant, therefore what is the right code to overcome this annoying issue?

    Morrile

  2. #2
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,242
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    Experimental h5 is non normative but still RTL is the value you'd use for the text direction. Regarding the META pragma directive it would be deemed 'obsolete' in h5, you could consider specifying the language on the root element instead. For example; HTML lang="ar" that should very loosely cover both questions posed regarding the markup aspect.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  3. #3
    SitePoint Member
    Join Date
    Aug 2012
    Location
    London
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    you could consider specifying the language on the root element instead, e.g. HTML lang="ar" that should very loosely cover both questions posed.
    So does that replace both of these lines?

    <meta charset="UTF-8">
    <meta http-equiv="content-language" content="ar">

    Morrile

  4. #4
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,242
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    No, only the following: <meta http-equiv="content-language" content="ar"> would be obsolete since you cannot use that pragma (for the experimental h5). One alternative way would be use the lang attribute on the HTML root, resulting in: <html lang="ar" dir="rtl"> instead.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  5. #5
    SitePoint Member
    Join Date
    Aug 2012
    Location
    London
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    many thanks

  6. #6
    i want cake and cookies Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    9,996
    Mentioned
    41 Post(s)
    Tagged
    1 Thread(s)
    The dir=rtl in your html tag *should* (in proper user agents) also fix your text-copying.

  7. #7
    SitePoint Member
    Join Date
    Aug 2012
    Location
    London
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Robert,

    There is an error at line 5, column 7 (absolute position 59) of "templates:Persian.dwt": Unbalanced #EndEditable tag

    What does this mean?

    Morrile

  8. #8
    i want cake and cookies Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    9,996
    Mentioned
    41 Post(s)
    Tagged
    1 Thread(s)
    That has to do with your HTML editing software (dreamweaver?). It seems to be saying somewhere you started an editing tag but didn't close it, or you're closing one you never opened.

    But this is not an HTML error. HTML doesn't have Editable anythings (except the new contenteditable stuff they've added recently)

  9. #9
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,242
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    That's a Dreamweaver specific error with a DW template editable region (I don't have Dreamweaver installed or use it) to be balanced there has to be a #BeginEditable region and an #EndEditableRegion maybe you should create a new template loosely based on that one.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  10. #10
    SitePoint Member
    Join Date
    Aug 2012
    Location
    London
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks folks. I shall investigate further

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •