תיקון אתר שיצא הפוך בעברית

זו התקלה הנפוצה ביותר בבנייה עם AI בעברית. האתר נראה מצוין באנגלית, ואז מחליפים לעברית ופתאום האייקונים בצד הלא נכון, הכפתורים ברחו, ומספרי טלפון מוצגים הפוך. הסיבה כמעט תמיד אותה סיבה: המודל השתמש בשמות כיווניים כמו left ו-right במקום start ו-end. הפרומפט כתוב באנגלית ומוכן להעתקה, מתוך ספריית הפרומפטים של כליקס. מה שבסוגריים מרובעים הוא מה שאתם ממלאים לפני ההדבקה. מתאים לכל כלי שיש לו גישה לקוד: Lovable, Bolt, Cursor, Claude Code.

בניית אתרים · RTL · עברית · תיקון · CSS · באג

This site renders incorrectly in Hebrew. Fix the direction handling properly, not with individual overrides.

Do all of the following:

1. Set dir="rtl" and lang="he" on the html element, not on inner wrappers.

2. Replace every directional utility with its logical equivalent:
   - ml-* / mr-* becomes ms-* / me-*
   - pl-* / pr-* becomes ps-* / pe-*
   - left-* / right-* becomes start-* / end-*
   - text-left / text-right becomes text-start / text-end
   - border-l / border-r becomes border-s / border-e
   In plain CSS use margin-inline-start, padding-inline-end, inset-inline-start, and text-align: start.

3. Icons that indicate direction (back arrows, chevrons, carousel controls) must flip. Icons that represent objects (a phone, a cart, a checkmark) must not.

4. Wrap anything that must stay left-to-right in its own element with dir="ltr": phone numbers, email addresses, URLs, code snippets, version numbers, and Latin brand names.

5. Check that no element causes horizontal scroll at 375px width.

Report which files you changed and which rules were the actual cause, so I understand the pattern rather than just receiving a patch.

איך להשתמש בזה נכון