Direction and Language
Purpose
Configuration
pwa:
manifest:
enabled: true
dir: "ltr" # Text direction
lang: "en" # Primary language (ISO 639-1)The dir Parameter
dir ParameterAvailable Values
ltr (Left-to-Right)
rtl (Right-to-Left)
auto (Automatic)
The lang Parameter
lang ParameterLanguage Code Format
Common Language Codes
European Languages
Asian Languages
Right-to-Left Languages
Other Languages
Practical Examples
English (United States)
Arabic Application
French (France)
Chinese (Simplified)
Hebrew Application
Spanish (Mexico)
Multi-Language Support
Translatable Manifest Properties
Serving Different Manifests
HTML Integration
Matching HTML and Manifest
Symfony Twig Integration
CSS Considerations
RTL-Specific Styles
Logical CSS Properties
Accessibility Impact
Screen Readers
Text-to-Speech
SEO Considerations
Language Targeting
hreflang Relationship
hreflang RelationshipPlatform Behavior
iOS/Safari
Android/Chrome
Desktop Browsers
Common Mistakes
1. Mismatched Direction and Language
2. Missing Language Region
3. Invalid Language Codes
4. HTML/Manifest Mismatch
5. Forgetting RTL CSS
Testing
1. Test in DevTools
2. Test with Screen Readers
3. Visual Testing
4. Test Language Detection
Language Code Reference
ISO 639-1 Standard
Region Codes
Complete Format
Related Properties
Summary
Last updated
Was this helpful?