-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Add Urdu locale support #175
Open
Description
Urdu is spoken by over 230 million people worldwide and is the official language of Pakistan. Adding Urdu locale support will make the application accessible to a significant community of Urdu-speaking developers across Pakistan, India, and the diaspora.
Overview
Urdu will be added as a new supported locale with the language code ur. Like Arabic and Persian, Urdu is written right-to-left (RTL), so proper RTL support must be ensured throughout the application.
Tasks
- Create a new locale file
locales/ur.jsonwith all translation keys fromlocales/en.jsontranslated to Urdu. - Update
lib/i18n-core.tsto addurto thesupportedLocalesarray. - Add Urdu entry to the
localeMetaobject inlib/i18n-core.tswith the following configuration:ur: { dir: "rtl", label: "اردو" }
- Test the language switcher to ensure Urdu appears in the dropdown menu.
- Verify RTL layout is applied correctly across all components (using the existing
dirproperty mechanism). - Test the application with Urdu locale selected to ensure all UI elements display correctly.
- Ensure proper character encoding (UTF-8) is maintained for Urdu script throughout the application.
- Update
CONTRIBUTING.mdwith instructions for translating content to Urdu (if not already documented in the localization guide).
Translation Keys
All translation keys from the existing English locale must be translated to Urdu. The keys include:
- Application titles and subtitles
- Error messages
- UI labels and buttons
- Explanations and descriptions
- Comparison metrics
- Community contribution labels
- And more (reference
locales/en.jsonfor the complete list)
RTL Considerations
- Ensure the application respects the
dir: "rtl"setting for proper layout direction. - Test that text alignment, spacing, and component positioning work correctly in RTL mode.
- Verify that language-sensitive components (like tables, charts, and forms) display correctly in RTL.
- Ensure proper handling of Urdu-specific text rendering and character combinations.
Testing
- Language switcher displays "اردو" correctly.
- All pages render without errors when Urdu is selected.
- RTL layout is applied properly across all components.
- Urdu characters display correctly without encoding issues.
- No layout shifts or broken styling in RTL mode.
Tip
🚀 Want to contribute?
Comment assign me to be automatically assigned to this issue via our GitHub Actions bot. Happy coding! ✨