Lab 13: Internationalization
Overview
Step 1: Direction — dir Attribute
<!-- HTML-level direction -->
<html lang="en" dir="ltr"> <!-- Latin languages: left to right -->
<html lang="ar" dir="rtl"> <!-- Arabic: right to left -->
<html lang="he" dir="rtl"> <!-- Hebrew: right to left -->
<!-- Per-element direction -->
<p dir="auto">
<!-- auto: browser detects based on first strong directional character -->
This could be any language
</p>
<!-- Bidirectional content: RTL within LTR page -->
<p>
User wrote:
<bdi>مرحبا بالعالم</bdi> <!-- isolated bidirectional content -->
</p>
<!-- Override direction -->
<span dir="ltr">[email protected]</span> <!-- keep email LTR in RTL context -->
<span dir="rtl">⬅ Back</span>
<!-- Form inputs in RTL document -->
<input type="text" dir="auto" lang="ar">
<input type="email" dir="ltr"> <!-- emails always LTR -->Step 2: CSS Logical Properties — Full Reference
Step 3: RTL Layout Example
Step 4: Vertical Writing Modes
Step 5: :lang() Pseudo-Class
Step 6: International Font Stacks
Step 7: Intl.DateTimeFormat & unicode-bidi
Step 8: Capstone — RTL/LTR Logical Property Converter
Summary
Feature
Implementation
Languages
Last updated
